home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ELECTRON / H035B.ZIP / SPICEDOC.EXE / SPICE.DOC
Text File  |  1987-12-16  |  122KB  |  4,354 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                           SPICE GUIDE.DOC TABLE OF CONTENTS
  10.                           ---------------------------------
  11.  
  12.     SECTION        SUBJECT                      PAGE
  13.     -------        -------                      ----
  14.  
  15.  
  16.             Introduction                   1
  17.       1.        Types of Analysis                   2
  18.       1.1        DC Analysis                   2
  19.       1.2        AC Small-Signal Analysis           3
  20.       1.3        Transient Analysis               5
  21.       1.4        Analysis at Different Temperatures       5
  22.       2.        Convergence                   7
  23.       3.        Input Format                   8
  24.       4.        Circuit Description               9
  25.       5.        Title Card, Comment Cards, and .END Card   11
  26.       5.1        Title Card                   11
  27.       5.2        .END Card                   11
  28.       5.3        Comment Cards                   12
  29.       6.        Element Cards                   12
  30.       6.1        Resistors                   12
  31.       6.2        Capacitors and Inductors           13
  32.       6.3        Coupled (Mutual) Inductors           14
  33.       6.4        Transmission Lines (Lossless)           15
  34.       6.5        Linear Dependant Sources           16
  35.       6.6        Linear Voltage-Controlled Current Sources  17
  36.       6.7        Linear Voltage-Controlled Voltage Sources  17
  37.       6.8        Linear Current-Controlled Current Sources  18
  38.       6.9        Linear Current-Controlled Voltage Sources  18
  39.       6.10        Independent Sources               19
  40.       7.        Semiconductor Devices               24
  41.       7.1        Junction Diodes                   26
  42.       7.2        Bipolar Junction Transistors (BJTs)       27
  43.       7.3        Junction Field Effect Transistors (JFETs)  27
  44.       7.4        MOSFETs                       28
  45.       7.5        .MODEL Card                   29
  46.       7.6        Diode Model                   30
  47.       7.7        BJT Models (both NPN and PNP)           31
  48.       7.8        JFET Models (both N and P channel)        34
  49.       7.9        MOSFET Models (both N and P channel)       34
  50.       8.        Subcircuits                   38
  51.       8.1        .SUBCKT Card                   38
  52.       8.2        .ENDS Card                   39
  53.       8.3        Subcircuit Calls               40
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                           SPICE GUIDE.DOC TABLE OF CONTENTS
  65.                           ---------------------------------
  66.  
  67.     SECTION        SUBJECT                      PAGE
  68.     -------        -------                      ----
  69.  
  70.  
  71.       9.        Control Cards                   41
  72.       9.1        .TEMP Card                   41
  73.       9.2        .WIDTH Card                   41
  74.       9.3        .OPTIONS Card                   42
  75.       9.4        .OP Card                   44
  76.       9.5        .DC Card                   45
  77.       9.6         .NODESET Card                   45
  78.       9.7        .IC Card                   46
  79.       9.8        .TF Card                   47
  80.       9.9         .SENS Card                   48
  81.       9.10        .AC Card                   49
  82.       9.11        .DISTO Card                   49
  83.       9.12        .NOISE Card                   51
  84.       9.13        .TRAN Card                   52
  85.       9.14        .FOUR Card                   53
  86.       9.15        .PRINT Card                   54
  87.       9.16        .PLOT Card                   56
  88.       10.          Appendix A: Example Data Decks           58
  89.       10.1        Circuit 1                   58
  90.       10.2        Circuit 2                   58
  91.       10.3        Circuit 3                   60
  92.       10.4        Circuit 4                   60
  93.       10.5        Circuit 5                   62
  94.       11.           Appendix B: Nonlinear Dependent Sources       63
  95.       11.1        Voltage-Controlled Current Sources       65
  96.       11.2        Voltage-Controlled Voltage Sources       67
  97.       11.3        Current-Controlled Current Sources       68
  98.       11.4        Current-Controlled Voltage Sources       69
  99.       12.           Appendix C: Bipolar Model Equations        70
  100.       12.1        DC Model                   70
  101.       12.2        AC Model                   71
  102.       12.3        Noise Model                   72
  103.       12.4        Temperature Effects               73        
  104.       13.           Appendix D: Alter Statement and the       74
  105.                    Source-Stepping Method
  106.  
  107.  
  108.  
  109.         
  110.  
  111.  
  112.                                                                           1
  113.  
  114.  
  115.                             SPICE Version 2G User's Guide
  116.  
  117.                                     (10 Aug 1981)
  118.  
  119.                             A.Vladimirescu, Kaihe Zhang,
  120.                  A.R.Newton, D.O.Pederson, A.Sangiovanni-Vincentelli
  121.  
  122.              Department of Electrical Engineering and Computer Sciences
  123.                               University of California
  124.                                 Berkeley, Ca., 94720
  125.  
  126.  
  127.  
  128.           Acknowledgement: Dr. Richard Dowell and Dr. Sally Liu  have  con-
  129.  
  130.           tributed  to develop the present SPICE version.  SPICE was origi-
  131.  
  132.           nally developed by Dr.  Lawrence  Nagel  and  has  been  modified
  133.  
  134.           extensively by Dr. Ellis Cohen.
  135.  
  136.  
  137.  
  138.                SPICE is a general-purpose circuit  simulation  program  for
  139.  
  140.           nonlinear  dc, nonlinear transient, and linear ac analyses.  Cir-
  141.  
  142.           cuits may contain resistors, capacitors, inductors, mutual induc-
  143.  
  144.           tors,  independent  voltage  and  current  sources, four types of
  145.  
  146.           dependent sources, transmission lines, and the four  most  common
  147.  
  148.           semiconductor devices:  diodes, BJT's, JFET's, and MOSFET's.
  149.  
  150.  
  151.                SPICE has built-in models for the semiconductor devices, and
  152.  
  153.           the  user need specify only the pertinent model parameter values.
  154.  
  155.           The model for the BJT is based on the integral  charge  model  of
  156.  
  157.           Gummel and Poon;  however, if the Gummel- Poon parameters are not
  158.  
  159.           specified, the model reduces to the simpler Ebers-Moll model.  In
  160.  
  161.           either  case,  charge  storage  effects, ohmic resistances, and a
  162.  
  163.           current-dependent output conductance may be included.  The  diode
  164.  
  165.           model  can be used for either junction diodes or Schottky barrier
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.                                                                           2
  173.  
  174.  
  175.           diodes.  The JFET model is based on the FET model of Shichman and
  176.  
  177.           Hodges. Three MOSFET models are implemented; MOS1 is described by
  178.  
  179.           a square-law I-V characteristic MOS2 is an analytical model while
  180.  
  181.           MOS3  is  a  semi-empirical  model.   Both  MOS2 and MOS3 include
  182.  
  183.           second-order effects such as channel length modulation, subthres-
  184.  
  185.           hold  conduction,  scattering limited velocity saturation, small-
  186.  
  187.           size effects and charge-controlled capacitances.
  188.  
  189.  
  190.  
  191.  
  192.  
  193.           1.  TYPES OF ANALYSIS
  194.  
  195.  
  196.  
  197.           1.1.  DC Analysis
  198.  
  199.  
  200.  
  201.                The dc analysis portion of SPICE determines the dc operating
  202.  
  203.           point  of  the  circuit  with  inductors  shorted  and capacitors
  204.  
  205.           opened.  A dc analysis is  automatically  performed  prior  to  a
  206.  
  207.           transient analysis to determine the transient initial conditions,
  208.  
  209.           and prior to an ac small-signal analysis to determine the linear-
  210.  
  211.           ized,  small-signal  models for nonlinear devices.  If requested,
  212.  
  213.           the dc small-signal value of a transfer function (ratio of output
  214.  
  215.           variable  to  input  source), input resistance, and output resis-
  216.  
  217.           tance will also be computed as a part of the dc solution.  The dc
  218.  
  219.           analysis  can  also  be  used  to generate dc transfer curves:  a
  220.  
  221.           specified independent voltage or current source is stepped over a
  222.  
  223.           user-specified  range  and the dc output variables are stored for
  224.  
  225.           each sequential source value.   If  requested,  SPICE  also  will
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.                                                                           3
  233.  
  234.  
  235.           determine  the  dc small-signal sensitivities of specified output
  236.  
  237.           variables with respect to circuit parameters.   The  dc  analysis
  238.  
  239.           options  are  specified  on  the .DC, .TF, .OP, and .SENS control
  240.  
  241.           cards.
  242.  
  243.  
  244.                If one desires to see the small-signal models for  nonlinear
  245.  
  246.           devices in conjunction with a transient analysis operating point,
  247.  
  248.           then the .OP card must be provided.  The dc bias conditions  will
  249.  
  250.           be  identical for each case, but the more comprehensive operating
  251.  
  252.           point information is not available to be printed  when  transient
  253.  
  254.           initial conditions are computed.
  255.  
  256.  
  257.  
  258.           1.2.  AC Small-Signal Analysis
  259.  
  260.  
  261.  
  262.                The ac small-signal portion of SPICE computes the ac  output
  263.  
  264.           variables as a function of frequency.  The program first computes
  265.  
  266.           the dc operating point of the circuit and determines  linearized,
  267.  
  268.           small-signal  models for all of the nonlinear devices in the cir-
  269.  
  270.           cuit.  The resultant linear  circuit  is  then  analyzed  over  a
  271.  
  272.           user-specified range of frequencies.  The desired output of an ac
  273.  
  274.           small- signal analysis is usually a  transfer  function  (voltage
  275.  
  276.           gain,  transimpedance,  etc).   If  the  circuit  has only one ac
  277.  
  278.           input, it is convenient to set  that  input  to  unity  and  zero
  279.  
  280.           phase,  so  that  output  variables  have  the  same value as the
  281.  
  282.           transfer function of the output  variable  with  respect  to  the
  283.  
  284.           input.
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.                                                                           4
  292.  
  293.  
  294.                The generation of white noise by resistors and semiconductor
  295.  
  296.           devices can also be simulated with the ac small-signal portion of
  297.  
  298.           SPICE.  Equivalent noise source values are  determined  automati-
  299.  
  300.           cally  from  the small-signal operating point of the circuit, and
  301.  
  302.           the contribution of each noise source is added at a given summing
  303.  
  304.           point.   The  total  output  noise level and the equivalent input
  305.  
  306.           noise level are determined at each frequency point.   The  output
  307.  
  308.           and  input noise levels are normalized with respect to the square
  309.  
  310.           root of the noise bandwidth and have the  units  Volts/rt  Hz  or
  311.  
  312.           Amps/rt  Hz.   The output noise and equivalent input noise can be
  313.  
  314.           printed or plotted in the same fashion as other output variables.
  315.  
  316.           No additional input data are necessary for this analysis.
  317.  
  318.  
  319.                Flicker noise sources can be simulated in the noise analysis
  320.  
  321.           by including values for the parameters KF and AF on the appropri-
  322.  
  323.           ate device model cards.
  324.  
  325.  
  326.                The distortion characteristics of a circuit  in  the  small-
  327.  
  328.           signal  mode  can  be  simulated as a part of the ac small-signal
  329.  
  330.           analysis.  The analysis is performed assuming  that  one  or  two
  331.  
  332.           signal frequencies are imposed at the input.
  333.  
  334.  
  335.                The frequency range and the noise  and  distortion  analysis
  336.  
  337.           parameters  are  specified on the .AC, .NOISE, and .DISTO control
  338.  
  339.           lines.
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.                                                                           5
  347.  
  348.  
  349.           1.3.  Transient Analysis
  350.  
  351.  
  352.  
  353.                The transient analysis portion of SPICE computes  the  tran-
  354.  
  355.           sient  output  variables  as  a  function  of  time  over a user-
  356.  
  357.           specified time interval.  The initial  conditions  are  automati-
  358.  
  359.           cally  determined  by  a  dc analysis.  All sources which are not
  360.  
  361.           time dependent (for example, power supplies) are set to their  dc
  362.  
  363.           value.    For  large-signal  sinusoidal  simulations,  a  Fourier
  364.  
  365.           analysis of the output waveform can be specified  to  obtain  the
  366.  
  367.           frequency domain Fourier coefficients.  The transient time inter-
  368.  
  369.           val and the Fourier analysis options are specified on  the  .TRAN
  370.  
  371.           and .FOURIER control lines.
  372.  
  373.  
  374.  
  375.           1.4.  Analysis at Different Temperatures
  376.  
  377.  
  378.                All input data for SPICE is assumed to have been measured at
  379.  
  380.           27 deg C (300 deg K).  The simulation also assumes a nominal tem-
  381.  
  382.           perature of 27 deg C.  The circuit can be simulated at other tem-
  383.  
  384.           peratures by using a .TEMP control line.
  385.  
  386.  
  387.                Temperature appears explicitly in the exponential  terms  of
  388.  
  389.           the  BJT  and  diode  model  equations.   In addition, saturation
  390.  
  391.           currents have a built-in temperature dependence.  The temperature
  392.  
  393.           dependence  of the saturation current in the BJT models is deter-
  394.  
  395.           mined by:
  396.  
  397.  
  398.               IS(T1) = IS(T0)*((T1/T0)**XTI)*exp(q*EG*(T1-T0)/(k*T1*T0))
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.                                                                           6
  406.  
  407.  
  408.           where k is Boltzmann's constant, q is the electronic  charge,  EG
  409.  
  410.           is  the  energy  gap  which  is a model parameter, and XTI is the
  411.  
  412.           saturation current temperature exponent (also a model  parameter,
  413.  
  414.           and  usually  equal to 3).  The temperature dependence of forward
  415.  
  416.           and reverse beta is according to the formula:
  417.  
  418.  
  419.               beta(T1)=beta(T0)*(T1/T0)**XTB
  420.  
  421.  
  422.           where T1 and T0 are in degrees Kelvin, and XTB is a user-supplied
  423.  
  424.           model  parameter.  Temperature effects on beta are carried out by
  425.  
  426.           appropriate adjustment to the values of BF,  ISE,  BR,  and  ISC.
  427.  
  428.           Temperature  dependence of the saturation current in the junction
  429.  
  430.           diode model is determined by:
  431.  
  432.  
  433.               IS(T1) = IS(T0)*((T1/T0)**(XTI/N))*exp(q*EG*(T1-T0)/(k*N*T1*T0))
  434.  
  435.  
  436.           where N is the emission coefficient, which is a model  parameter,
  437.  
  438.           and  the other symbols have the same meaning as above.  Note that
  439.  
  440.           for Schottky barrier diodes, the value of the saturation  current
  441.  
  442.           temperature exponent, XTI, is usually 2.
  443.  
  444.  
  445.                Temperature appears explicitly  in  the  value  of  junction
  446.  
  447.           potential,  PHI,  for  all  the  device  models.  The temperature
  448.  
  449.           dependence is determined by:
  450.  
  451.  
  452.               PHI(TEMP) = k*TEMP/q*log(Na*Nd/Ni(TEMP)**2)
  453.  
  454.  
  455.           where k is Boltzmann's constant, q is the electronic  charge,  Na
  456.  
  457.           is  the  acceptor impurity density, Nd is the donor impurity den-
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.                                                                           7
  465.  
  466.  
  467.           sity, Ni is the intrinsic concentration, and  EG  is  the  energy
  468.  
  469.           gap.
  470.  
  471.  
  472.                Temperature appears  explicitly  in  the  value  of  surface
  473.  
  474.           mobility,  UO,  for the MOSFET model.  The temperature dependence
  475.  
  476.           is determined by:
  477.  
  478.  
  479.               UO(TEMP) = UO(TNOM)/(TEMP/TNOM)**(1.5)
  480.  
  481.  
  482.           The effects of temperature on resistors is modeled  by  the  for-
  483.  
  484.           mula:
  485.  
  486.  
  487.               value(TEMP) = value(TNOM)*(1+TC1*(TEMP-TNOM)+TC2*(TEMP-TNOM)**2))
  488.  
  489.  
  490.           where TEMP is the circuit temperature, TNOM is the  nominal  tem-
  491.  
  492.           perature,  and  TC1  and TC2 are the first- and second-order tem-
  493.  
  494.           perature coefficients.
  495.  
  496.  
  497.  
  498.  
  499.  
  500.           2.  CONVERGENCE
  501.  
  502.  
  503.  
  504.                Both dc and transient solutions are obtained by an iterative
  505.  
  506.           process which is terminated when both of the following conditions
  507.  
  508.           hold:
  509.  
  510.  
  511.  
  512.           1)   The nonlinear branch currents converge to within a tolerance
  513.  
  514.                of  0.1  percent  or  1  picoamp (1.0E-12 Amp), whichever is
  515.  
  516.                larger.
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.                                                                           8
  524.  
  525.  
  526.           2)   The node voltages converge to within a tolerance of 0.1 per-
  527.  
  528.                cent or 1 microvolt (1.0E-6 Volt), whichever is larger.
  529.  
  530.  
  531.                Although the algorithm used in SPICE has been  found  to  be
  532.  
  533.           very  reliable, in some cases it will fail to converge to a solu-
  534.  
  535.           tion.  When this failure occurs, the program will print the  node
  536.  
  537.           voltages  at  the  last iteration and terminate the job.  In such
  538.  
  539.           cases, the node voltages that are  printed  are  not  necessarily
  540.  
  541.           correct or even close to the correct solution.
  542.  
  543.  
  544.                Failure to converge in the dc analysis is usually due to  an
  545.  
  546.           error in specifying circuit connections, element values, or model
  547.  
  548.           parameter values.  Regenerative switching  circuits  or  circuits
  549.  
  550.           with  positive  feedback  probably  will  not  converge in the dc
  551.  
  552.           analysis unless the OFF option is used for some of the devices in
  553.  
  554.           the feedback path, or the .NODESET card is used to force the cir-
  555.  
  556.           cuit to converge to the desired state.
  557.  
  558.  
  559.  
  560.  
  561.  
  562.           3.  INPUT FORMAT
  563.  
  564.  
  565.  
  566.                The input format for SPICE  is  of  the  free  format  type.
  567.  
  568.           Fields on a card are separated by one or more blanks, a comma, an
  569.  
  570.           equal (=) sign, or a left or right parenthesis;  extra spaces are
  571.  
  572.           ignored.   A  card  may  be  continued  by entering a + (plus) in
  573.  
  574.           column 1 of the following card;  SPICE continues  reading  begin-
  575.  
  576.           ning with column 2.
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.                                                                           9
  584.  
  585.  
  586.                A name field must begin with a letter (A through Z) and can-
  587.  
  588.           not  contain  any delimiters.  Only the first eight characters of
  589.  
  590.           the name are used.
  591.  
  592.  
  593.                A number field may be an integer field (12, -44), a floating
  594.  
  595.           point field (3.14159), either an integer or floating point number
  596.  
  597.           followed by an integer exponent (1E-14,  2.65E3),  or  either  an
  598.  
  599.           integer or a floating point number followed by one of the follow-
  600.  
  601.           ing scale factors:
  602.  
  603.  
  604.  
  605.                   T=1E12   G=1E9    MEG=1E6   K=1E3     MIL=25.4E-6
  606.                   M=1E-3   U=1E-6   N=1E-9    P=1E-12   F=1E-15
  607.  
  608.  
  609.           Letters immediately following a number that are not scale factors
  610.  
  611.           are ignored, and letters immediately following a scale factor are
  612.  
  613.           ignored.  Hence, 10, 10V, 10VOLTS, and  10HZ  all  represent  the
  614.  
  615.           same  number,  and  M, MA, MSEC, and MMHOS all represent the same
  616.  
  617.           scale factor.  Note that 1000, 1000.0, 1000HZ, 1E3, 1.0E3,  1KHZ,
  618.  
  619.           and 1K all represent the same number.
  620.  
  621.  
  622.  
  623.  
  624.  
  625.           4.  CIRCUIT DESCRIPTION
  626.  
  627.  
  628.  
  629.                The circuit to be analyzed is described to SPICE by a set of
  630.  
  631.           element  cards,  which  define  the  circuit topology and element
  632.  
  633.           values, and a set of control cards, which define the model param-
  634.  
  635.           eters  and  the  run  controls.  The first card in the input deck
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.                                                                          10
  643.  
  644.  
  645.           must be a title card, and the last card must be a .END card.  The
  646.  
  647.           order  of  the  remaining  cards is arbitrary (except, of course,
  648.  
  649.           that continuation cards must immediately follow  the  card  being
  650.  
  651.           continued).
  652.  
  653.  
  654.                Each element in the circuit is specified by an element  card
  655.  
  656.           that  contains  the  element name, the circuit nodes to which the
  657.  
  658.           element is connected, and  the  values  of  the  parameters  that
  659.  
  660.           determine  the  electrical  characteristics  of the element.  The
  661.  
  662.           first letter of the element name specifies the element type.  The
  663.  
  664.           format for the SPICE element types is given in what follows.  The
  665.  
  666.           strings  XXXXXXX,   YYYYYYY,   and   ZZZZZZZ   denote   arbitrary
  667.  
  668.           alphanumeric  strings.   For  example, a resistor name must begin
  669.  
  670.           with the letter R and can contain from one to  eight  characters.
  671.  
  672.           Hence, R, R1, RSE, ROUT, and R3AC2ZY are valid resistor names.
  673.  
  674.  
  675.                Data fields that are enclosed in lt and gt signs '<  >'  are
  676.  
  677.           optional.   All  indicated punctuation (parentheses, equal signs,
  678.  
  679.           etc.)  are  required.   With  respect  to  branch  voltages   and
  680.  
  681.           currents,  SPICE  uniformly uses the associated reference conven-
  682.  
  683.           tion (current flows in the direction of voltage drop).
  684.  
  685.  
  686.                Nodes must be nonnegative integers but need not be  numbered
  687.  
  688.           sequentially.   The  datum  (ground)  node must be numbered zero.
  689.  
  690.           The circuit cannot contain  a  loop  of  voltage  sources  and/or
  691.  
  692.           inductors  and  cannot contain a cutset of current sources and/or
  693.  
  694.           capacitors.  Each node in the circuit must  have  a  dc  path  to
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.                                                                          11
  702.  
  703.  
  704.           ground.  Every node must have at least two connections except for
  705.  
  706.           transmission line  nodes  (to  permit  unterminated  transmission
  707.  
  708.           lines)  and  MOSFET substrate nodes (which have two internal con-
  709.  
  710.           nections anyway).
  711.  
  712.  
  713.  
  714.  
  715.  
  716.           5.  TITLE CARD, COMMENT CARDS AND .END CARD
  717.  
  718.  
  719.  
  720.           5.1.  Title Card
  721.  
  722.  
  723.           Examples:
  724.  
  725.  
  726.               POWER AMPLIFIER CIRCUIT
  727.               TEST OF CAM CELL
  728.  
  729.  
  730.  
  731.                This card must be the first card in  the  input  deck.   Its
  732.  
  733.           contents  are printed verbatim as the heading for each section of
  734.  
  735.           output.
  736.  
  737.  
  738.  
  739.           5.2.  .END Card
  740.  
  741.           Examples:
  742.  
  743.  
  744.                .END
  745.  
  746.  
  747.  
  748.                This card must always be the last card in  the  input  deck.
  749.  
  750.           Note that the period is an integral part of the name.
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.                                                                          12
  758.  
  759.  
  760.           5.3.  Comment Card
  761.  
  762.  
  763.           General Form:
  764.  
  765.  
  766.               * <any comment>
  767.  
  768.  
  769.           Examples:
  770.  
  771.  
  772.               * RF=1K      GAIN SHOULD BE 100
  773.               * MAY THE FORCE BE WITH MY CIRCUIT
  774.  
  775.  
  776.  
  777.                The asterisk in the first column indicates that this card is
  778.  
  779.           a comment card.  Comment cards may be placed anywhere in the cir-
  780.  
  781.           cuit description.
  782.  
  783.  
  784.  
  785.  
  786.  
  787.           6.  ELEMENT CARDS
  788.  
  789.  
  790.  
  791.           6.1.  Resistors
  792.  
  793.           General form:
  794.  
  795.  
  796.               RXXXXXXX N1 N2 VALUE <TC=TC1<,TC2>>
  797.  
  798.  
  799.           Examples:
  800.  
  801.  
  802.               R1 1 2 100
  803.               RC1 12 17 1K TC=0.001,0.015
  804.  
  805.  
  806.  
  807.                N1 and N2 are the two element nodes.  VALUE  is  the  resis-
  808.  
  809.           tance  (in  ohms)  and  may be positive or negative but not zero.
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.                                                                          13
  817.  
  818.  
  819.           TC1 and TC2 are the (optional) temperature coefficients;  if  not
  820.  
  821.           specified,  zero  is assumed for both.  The value of the resistor
  822.  
  823.           as a function of temperature is given by:
  824.  
  825.  
  826.               value(TEMP) = value(TNOM)*(1+TC1*(TEMP-TNOM)+TC2*(TEMP-TNOM)**2))
  827.  
  828.  
  829.  
  830.  
  831.           6.2.  Capacitors and Inductors
  832.  
  833.  
  834.           General form:
  835.  
  836.  
  837.               CXXXXXXX N+ N- VALUE <IC=INCOND>
  838.               LYYYYYYY N+ N- VALUE <IC=INCOND>
  839.  
  840.  
  841.           Examples:
  842.  
  843.  
  844.               CBYP 13 0 1UF
  845.               COSC 17 23 10U IC=3V
  846.               LLINK 42 69 1UH
  847.               LSHUNT 23 51 10U IC=15.7MA
  848.  
  849.  
  850.  
  851.                N+ and N- are  the  positive  and  negative  element  nodes,
  852.  
  853.           respectively.   VALUE  is the capacitance in Farads or the induc-
  854.  
  855.           tance in Henries.
  856.  
  857.  
  858.                For the capacitor, the (optional) initial condition  is  the
  859.  
  860.           initial  (time-zero)  value of capacitor voltage (in Volts).  For
  861.  
  862.           the inductor, the (optional) initial  condition  is  the  initial
  863.  
  864.           (time-zero)  value  of inductor current (in Amps) that flows from
  865.  
  866.           N+, through the inductor, to N-.  Note that  the  initial  condi-
  867.  
  868.           tions (if any) apply 'only' if the UIC option is specified on the
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.                                                                          14
  876.  
  877.  
  878.           .TRAN card.
  879.  
  880.  
  881.                Nonlinear capacitors and inductors can be described.
  882.  
  883.  
  884.           General form :
  885.  
  886.  
  887.               CXXXXXXX N+ N- POLY C0 C1 C2 ... <IC=INCOND>
  888.               LYYYYYYY N+ N- POLY L0 L1 L2 ... <IC=INCOND>
  889.  
  890.  
  891.  
  892.                C0 C1 C2 ...(and L0 L1 L2 ...) are  the  coefficients  of  a
  893.  
  894.           polynomial  describing  the  element  value.  The  capacitance is
  895.  
  896.           expressed as a function of the voltage across the  element  while
  897.  
  898.           the inductance is a function of the current through the inductor.
  899.  
  900.           The value is computed as
  901.  
  902.  
  903.               value=C0+C1*V+C2*V**2+...
  904.               value=L0+L1*I+L2*I**2+...
  905.  
  906.  
  907.  
  908.                where V is the  voltage  across  the  capacitor  and  I  the
  909.  
  910.           current flowing in the inductor.
  911.  
  912.  
  913.  
  914.           6.3.  Coupled (Mutual) Inductors
  915.  
  916.  
  917.           General form:
  918.  
  919.  
  920.               KXXXXXXX LYYYYYYY LZZZZZZZ VALUE
  921.  
  922.  
  923.           Examples:
  924.  
  925.  
  926.               K43 LAA LBB 0.999
  927.               KXFRMR L1 L2 0.87
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.                                                                          15
  935.  
  936.  
  937.                LYYYYYYY and LZZZZZZZ are  the  names  of  the  two  coupled
  938.  
  939.           inductors,  and  VALUE  is  the coefficient of coupling, K, which
  940.  
  941.           must be greater than 0 and less than or equal to  1.   Using  the
  942.  
  943.           'dot'  convention, place a 'dot' on the first node of each induc-
  944.  
  945.           tor.
  946.  
  947.  
  948.  
  949.           6.4.  Transmission Lines (Lossless)
  950.  
  951.  
  952.           General form:
  953.  
  954.  
  955.               TXXXXXXX N1 N2 N3 N4 Z0=VALUE <TD=VALUE> <F=FREQ <NL=NRMLEN>>
  956.               +                    <IC=V1,I1,V2,I2>
  957.  
  958.  
  959.           Examples:
  960.  
  961.  
  962.               T1 1 0 2 0 Z0=50 TD=10NS
  963.  
  964.  
  965.  
  966.                N1 and N2 are the nodes at port 1;  N3 and N4 are the  nodes
  967.  
  968.           at  port  2.   Z0 is the characteristic impedance.  The length of
  969.  
  970.           the line may be expressed in either of two forms.  The  transmis-
  971.  
  972.           sion  delay, TD, may be specified directly (as TD=10ns, for exam-
  973.  
  974.           ple).  Alternatively, a frequency F may be given,  together  with
  975.  
  976.           NL,  the  normalized  electrical  length of the transmission line
  977.  
  978.           with respect to the wavelength in the line at  the  frequency  F.
  979.  
  980.           If  a  frequency  is specified but NL is omitted, 0.25 is assumed
  981.  
  982.           (that is, the frequency is assumed to be  the  quarter-wave  fre-
  983.  
  984.           quency).   Note  that although both forms for expressing the line
  985.  
  986.           length are indicated as optional, one of the two must  be  speci-
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.                                                                          16
  994.  
  995.  
  996.           fied.
  997.  
  998.  
  999.                Note that this element models only one propagating mode.  If
  1000.  
  1001.           all four nodes are distinct in the actual circuit, then two modes
  1002.  
  1003.           may be excited.  To simulate such a situation, two  transmission-
  1004.  
  1005.           line  elements  are required.  (see the example in Appendix A for
  1006.  
  1007.           further clarification.)
  1008.  
  1009.  
  1010.                The (optional) initial condition specification  consists  of
  1011.  
  1012.           the  voltage  and current at each of the transmission line ports.
  1013.  
  1014.           Note that the initial conditions (if any) apply 'only' if the UIC
  1015.  
  1016.           option is specified on the .TRAN card.
  1017.  
  1018.  
  1019.                One should be aware that SPICE will use  a  transient  time-
  1020.  
  1021.           step  which  does  not  exceed  1/2 the minimum transmission line
  1022.  
  1023.           delay.  Therefore very short transmission  lines  (compared  with
  1024.  
  1025.           the analysis time frame) will cause long run times.
  1026.  
  1027.  
  1028.  
  1029.           6.5.  Linear Dependent Sources
  1030.  
  1031.  
  1032.  
  1033.                SPICE allows circuits to contain  linear  dependent  sources
  1034.  
  1035.           characterized by any of the four equations
  1036.  
  1037.  
  1038.                   i=g*v          v=e*v          i=f*i          v=h*i
  1039.  
  1040.  
  1041.           where g, e, f, and h are constants representing transconductance,
  1042.  
  1043.           voltage  gain,  current  gain, and transresistance, respectively.
  1044.  
  1045.           Note:  a more complete description of dependent sources as imple-
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                                                          17
  1053.  
  1054.  
  1055.           mented in SPICE is given in Appendix B.
  1056.  
  1057.  
  1058.  
  1059.           6.6.  Linear Voltage-Controlled Current Sources
  1060.  
  1061.  
  1062.           General form:
  1063.  
  1064.  
  1065.               GXXXXXXX N+ N- NC+ NC- VALUE
  1066.  
  1067.  
  1068.           Examples:
  1069.  
  1070.  
  1071.               G1 2 0 5 0 0.1MMHO
  1072.  
  1073.  
  1074.  
  1075.                N+ and N- are the positive and negative nodes, respectively.
  1076.  
  1077.           Current  flow  is  from the positive node, through the source, to
  1078.  
  1079.           the negative node.  NC+ and NC- are  the  positive  and  negative
  1080.  
  1081.           controlling  nodes,  respectively.  VALUE is the transconductance
  1082.  
  1083.           (in mhos).
  1084.  
  1085.  
  1086.  
  1087.           6.7.  Linear Voltage-Controlled Voltage Sources
  1088.  
  1089.           General form:
  1090.  
  1091.  
  1092.               EXXXXXXX N+ N- NC+ NC- VALUE
  1093.  
  1094.  
  1095.           Examples:
  1096.  
  1097.  
  1098.               E1 2 3 14 1 2.0
  1099.  
  1100.  
  1101.  
  1102.                N+ is the positive node, and N- is the negative  node.   NC+
  1103.  
  1104.           and  NC- are the positive and negative controlling nodes, respec-
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.                                                                          18
  1112.  
  1113.  
  1114.           tively.  VALUE is the voltage gain.
  1115.  
  1116.  
  1117.  
  1118.           6.8.  Linear Current-Controlled Current Sources
  1119.  
  1120.  
  1121.           General form:
  1122.  
  1123.  
  1124.               FXXXXXXX N+ N- VNAM VALUE
  1125.  
  1126.  
  1127.           Examples:
  1128.  
  1129.  
  1130.               F1 13 5 VSENS 5
  1131.  
  1132.  
  1133.  
  1134.                N+ and N- are the positive and negative nodes, respectively.
  1135.  
  1136.           Current  flow  is  from the positive node, through the source, to
  1137.  
  1138.           the negative node.  VNAM is the name of a voltage source  through
  1139.  
  1140.           which  the  controlling current flows.  The direction of positive
  1141.  
  1142.           controlling current flow is from the positive node,  through  the
  1143.  
  1144.           source, to the negative node of VNAM.  VALUE is the current gain.
  1145.  
  1146.  
  1147.  
  1148.           6.9.  Linear Current-Controlled Voltage Sources
  1149.  
  1150.           General form:
  1151.  
  1152.  
  1153.               HXXXXXXX N+ N- VNAM VALUE
  1154.  
  1155.  
  1156.           Examples:
  1157.  
  1158.  
  1159.               HX 5 17 VZ 0.5K
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.                                                                          19
  1167.  
  1168.  
  1169.                N+ and N- are the positive and negative nodes, respectively.
  1170.  
  1171.           VNAM  is  the name of a voltage source through which the control-
  1172.  
  1173.           ling  current  flows.   The  direction  of  positive  controlling
  1174.  
  1175.           current  flow  is  from the positive node, through the source, to
  1176.  
  1177.           the negative node of VNAM.   VALUE  is  the  transresistance  (in
  1178.  
  1179.           ohms).
  1180.  
  1181.  
  1182.  
  1183.           6.10.  Independent Sources
  1184.  
  1185.  
  1186.           General form:
  1187.  
  1188.  
  1189.               VXXXXXXX N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
  1190.               IYYYYYYY N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
  1191.  
  1192.  
  1193.           Examples:
  1194.  
  1195.  
  1196.               VCC 10 0 DC 6
  1197.               VIN 13 2 0.001 AC 1 SIN(0 1 1MEG)
  1198.               ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K)
  1199.               VMEAS 12 9
  1200.  
  1201.  
  1202.  
  1203.                N+ and N- are the positive and negative nodes, respectively.
  1204.  
  1205.           Note that voltage sources need not be grounded.  Positive current
  1206.  
  1207.           is assumed to flow from the positive node, through the source, to
  1208.  
  1209.           the  negative  node.   A  current  source of positive value, will
  1210.  
  1211.           force current to flow out of the N+ node, through the source, and
  1212.  
  1213.           into the N- node.  Voltage sources, in addition to being used for
  1214.  
  1215.           circuit excitation, are the 'ammeters' for SPICE, that  is,  zero
  1216.  
  1217.           valued  voltage  sources may be inserted into the circuit for the
  1218.  
  1219.           purpose of measuring current.  They  will,  of  course,  have  no
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.                                                                          20
  1227.  
  1228.  
  1229.           effect on circuit operation since they represent short-circuits.
  1230.  
  1231.  
  1232.  
  1233.                DC/TRAN is the  dc  and  transient  analysis  value  of  the
  1234.  
  1235.           source.   If  the  source value is zero both for dc and transient
  1236.  
  1237.           analyses, this value may be omitted.   If  the  source  value  is
  1238.  
  1239.           time-invariant (e.g., a power supply), then the value may option-
  1240.  
  1241.           ally be preceded by the letters DC.
  1242.  
  1243.  
  1244.  
  1245.                ACMAG is the ac magnitude and ACPHASE is the ac phase.   The
  1246.  
  1247.           source  is  set  to  this  value in the ac analysis.  If ACMAG is
  1248.  
  1249.           omitted following the keyword AC, a value of  unity  is  assumed.
  1250.  
  1251.           If ACPHASE is omitted, a value of zero is assumed.  If the source
  1252.  
  1253.           is not an ac small-signal input, the keyword AC and the ac values
  1254.  
  1255.           are omitted.
  1256.  
  1257.  
  1258.  
  1259.                Any independent source  can  be  assigned  a  time-dependent
  1260.  
  1261.           value  for  transient  analysis.  If a source is assigned a time-
  1262.  
  1263.           dependent value, the time-zero value is  used  for  dc  analysis.
  1264.  
  1265.           There are five independent source functions:  pulse, exponential,
  1266.  
  1267.           sinusoidal,  piece-wise  linear,  and  single-frequency  FM.   If
  1268.  
  1269.           parameters  other  than source values are omitted or set to zero,
  1270.  
  1271.           the default values shown will be assumed.  (TSTEP is the printing
  1272.  
  1273.           increment  and  TSTOP  is  the final time (see the .TRAN card for
  1274.  
  1275.           explanation)).
  1276.  
  1277.  
  1278.           1.  Pulse         PULSE(V1 V2 TD TR TF PW PER)
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.                                                                          21
  1286.  
  1287.  
  1288.           Examples:
  1289.  
  1290.  
  1291.               VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS)
  1292.  
  1293.  
  1294.  
  1295.                parameters              default values         units
  1296.  
  1297.                V1 (initial value)                       Volts or Amps
  1298.                V2 (pulsed value)                        Volts or Amps
  1299.                TD (delay time)         0.0              seconds
  1300.                TR (rise time)          TSTEP            seconds
  1301.                TF (fall time)          TSTEP            seconds
  1302.                PW (pulse width)        TSTOP            seconds
  1303.                PER(period)             TSTOP            seconds
  1304.  
  1305.  
  1306.  
  1307.                A single pulse so specified is described  by  the  following
  1308.  
  1309.           table:
  1310.  
  1311.  
  1312.  
  1313.                                  time          value
  1314.  
  1315.                                  0             V1
  1316.                                  TD            V1
  1317.                                  TD+TR         V2
  1318.                                  TD+TR+PW      V2
  1319.                                  TD+TR+PW+TF   V1
  1320.                                  TSTOP         V1
  1321.  
  1322.  
  1323.           Intermediate points are determined by linear interpolation.
  1324.  
  1325.  
  1326.           2.  Sinusoidal    SIN(VO VA FREQ TD THETA)
  1327.  
  1328.           Examples:
  1329.  
  1330.  
  1331.               VIN 3 0 SIN(0 1 100MEG 1NS 1E10)
  1332.  
  1333.  
  1334.  
  1335.  
  1336.                parameters                default value   units
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.                                                                          22
  1344.  
  1345.  
  1346.                VO     (offset)                           Volts or Amps
  1347.                VA     (amplitude)                        Volts or Amps
  1348.                FREQ   (frequency)        1/TSTOP         Hz
  1349.                TD     (delay)            0.0             seconds
  1350.                THETA  (damping factor)   0.0             1/seconds
  1351.  
  1352.  
  1353.  
  1354.                The shape of the waveform  is  described  by  the  following
  1355.  
  1356.           table:
  1357.  
  1358.  
  1359.  
  1360.           time          value
  1361.  
  1362.           0 to TD       VO
  1363.           TD to TSTOP   VO + VA*exp(-(time-TD)*THETA)*sine(twopi*FREQ*(time+TD))
  1364.  
  1365.  
  1366.  
  1367.           3.  Exponential  EXP(V1 V2 TD1 TAU1 TD2 TAU2)
  1368.  
  1369.  
  1370.           Examples:
  1371.  
  1372.  
  1373.               VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS)
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                                                                          23
  1381.  
  1382.  
  1383.              parameters                  default values   units
  1384.  
  1385.              V1   (initial value)                         Volts or Amps
  1386.              V2   (pulsed value)                          Volts or Amps
  1387.              TD1  (rise delay time)      0.0              seconds
  1388.              TAU1 (rise time constant)   TSTEP            seconds
  1389.              TD2  (fall delay time)      TD1+TSTEP        seconds
  1390.              TAU2 (fall time constant)   TSTEP            seconds
  1391.  
  1392.  
  1393.  
  1394.                The shape of the waveform  is  described  by  the  following
  1395.  
  1396.           table:
  1397.  
  1398.  
  1399.                  time           value
  1400.  
  1401.                  0 to TD1       V1
  1402.                  TD1 to TD2     V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1))
  1403.                  TD2 to TSTOP   V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1))
  1404.                                 +(V1-V2)*(1-exp(-(time-TD2)/TAU2))
  1405.  
  1406.  
  1407.  
  1408.           4.  Piece-Wise Linear  PWL(T1 V1 <T2 V2 T3 V3 T4 V4 ...>)
  1409.  
  1410.           Examples:
  1411.  
  1412.  
  1413.               VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)
  1414.  
  1415.  
  1416.  
  1417.           Parameters and default values
  1418.  
  1419.  
  1420.  
  1421.      Each pair of values (Ti, Vi) specifies that the value of the source is Vi
  1422.  (in Volts or Amps) at time=Ti.  The value of the source at intermediate values
  1423.      of time is determined by using linear interpolation on the input values.
  1424.  
  1425.  
  1426.  
  1427.           5.  Single-Frequency FM   SFFM(VO VA FC MDI FS)
  1428.  
  1429.  
  1430.           Examples:
  1431.  
  1432.  
  1433.               V1 12 0 SFFM(0 1M 20K 5 1K)
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.                                                                          24
  1441.  
  1442.  
  1443.               parameters                default values   units
  1444.  
  1445.               VO  (offset)                               Volts or Amps
  1446.               VA  (amplitude)                            Volts or Amps
  1447.               FC  (carrier frequency)   1/TSTOP          Hz
  1448.               MDI (modulation index)
  1449.               FS  (signal frequency)    1/TSTOP          Hz
  1450.  
  1451.  
  1452.  
  1453.                The shape of the waveform  is  described  by  the  following
  1454.  
  1455.           equation:
  1456.  
  1457.  
  1458.  
  1459.               value = VO + VA*sine((twopi*FC*time) + MDI*sine(twopi*FS*time))
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.           7.  SEMICONDUCTOR DEVICES
  1467.  
  1468.  
  1469.  
  1470.                The elements that have been described to  this  point  typi-
  1471.  
  1472.           cally  require  only a few parameter values to specify completely
  1473.  
  1474.           the electrical characteristics  of  the  element.   However,  the
  1475.  
  1476.           models  for  the  four semiconductor devices that are included in
  1477.  
  1478.           the SPICE program require many parameter values.  Moreover,  many
  1479.  
  1480.           devices  in a circuit often are defined by the same set of device
  1481.  
  1482.           model parameters.  For these  reasons,  a  set  of  device  model
  1483.  
  1484.           parameters  is  defined  on a separate .MODEL card and assigned a
  1485.  
  1486.           unique model name.  The device element cards in SPICE then refer-
  1487.  
  1488.           ence  the model name.  This scheme alleviates the need to specify
  1489.  
  1490.           all of the model parameters on each device element card.
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.                                                                          25
  1498.  
  1499.  
  1500.                Each device element card contains the device name, the nodes
  1501.  
  1502.           to  which the device is connected, and the device model name.  In
  1503.  
  1504.           addition, other optional parameters may  be  specified  for  each
  1505.  
  1506.           device:  geometric factors and an initial condition.
  1507.  
  1508.  
  1509.                The area factor used on the diode, BJT and JFET device  card
  1510.  
  1511.           determines  the number of equivalent parallel devices of a speci-
  1512.  
  1513.           fied model.  The affected parameters are marked with an  asterisk
  1514.  
  1515.           under  the  heading  'area'  in  the  model  descriptions  below.
  1516.  
  1517.           Several geometric factors associated with  the  channel  and  the
  1518.  
  1519.           drain and source diffusions can be specified on the MOSFET device
  1520.  
  1521.           card.
  1522.  
  1523.  
  1524.                Two different forms of initial conditions may  be  specified
  1525.  
  1526.           for  devices.   The first form is included to improve the dc con-
  1527.  
  1528.           vergence for circuits that contain more than  one  stable  state.
  1529.  
  1530.           If  a  device  is specified OFF, the dc operating point is deter-
  1531.  
  1532.           mined with the terminal voltages for that  device  set  to  zero.
  1533.  
  1534.           After  convergence  is obtained, the program continues to iterate
  1535.  
  1536.           to obtain the exact value for the terminal voltages.  If  a  cir-
  1537.  
  1538.           cuit  has  more  than  one dc stable state, the OFF option can be
  1539.  
  1540.           used to force the solution to correspond to a desired state.   If
  1541.  
  1542.           a  device is specified OFF when in reality the device is conduct-
  1543.  
  1544.           ing, the program will still obtain the correct solution (assuming
  1545.  
  1546.           the  solutions  converge)  but  more  iterations will be required
  1547.  
  1548.           since the program must independently  converge  to  two  separate
  1549.  
  1550.           solutions.  The .NODESET card serves a similar purpose as the OFF
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.                                                                          26
  1558.  
  1559.  
  1560.           option.  The .NODESET option is easier to apply and is  the  pre-
  1561.  
  1562.           ferred means to aid convergence.
  1563.  
  1564.  
  1565.                The second form of initial conditions are specified for  use
  1566.  
  1567.           with the transient analysis.  These are true 'initial conditions'
  1568.  
  1569.           as opposed to the convergence aids above.  See the description of
  1570.  
  1571.           the  .IC  card  and  the .TRAN card for a detailed explanation of
  1572.  
  1573.           initial conditions.
  1574.  
  1575.  
  1576.  
  1577.           7.1.  Junction Diodes
  1578.  
  1579.  
  1580.           General form:
  1581.  
  1582.  
  1583.               DXXXXXXX N+ N- MNAME <AREA> <OFF> <IC=VD>
  1584.  
  1585.  
  1586.           Examples:
  1587.  
  1588.  
  1589.               DBRIDGE 2 10 DIODE1
  1590.               DCLMP 3 7 DMOD 3.0 IC=0.2
  1591.  
  1592.  
  1593.  
  1594.                N+ and N- are the positive and negative nodes, respectively.
  1595.  
  1596.           MNAME  is  the model name, AREA is the area factor, and off indi-
  1597.  
  1598.           cates an (optional) starting  condition  on  the  device  for  dc
  1599.  
  1600.           analysis.   If  the  area  factor  is  omitted, a value of 1.0 is
  1601.  
  1602.           assumed.  The (optional) initial  condition  specification  using
  1603.  
  1604.           IC=VD  is intended for use with the UIC option on the .TRAN card,
  1605.  
  1606.           when a transient analysis is desired starting from other than the
  1607.  
  1608.           quiescent operating point.
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.                                                                          27
  1616.  
  1617.  
  1618.           7.2.  Bipolar Junction Transistors (BJT's)
  1619.  
  1620.  
  1621.           General form:
  1622.  
  1623.  
  1624.               QXXXXXXX NC NB NE <NS> MNAME <AREA> <OFF> <IC=VBE,VCE>
  1625.  
  1626.  
  1627.           Examples:
  1628.  
  1629.  
  1630.               Q23 10 24 13 QMOD IC=0.6,5.0
  1631.               Q50A 11 26 4 20 MOD1
  1632.  
  1633.  
  1634.  
  1635.                NC, NB, and NE are the collector, base, and  emitter  nodes,
  1636.  
  1637.           respectively.   NS is the (optional) substrate node.  If unspeci-
  1638.  
  1639.           fied, ground is used.  MNAME is the model name, AREA is the  area
  1640.  
  1641.           factor,  and OFF indicates an (optional) initial condition on the
  1642.  
  1643.           device for the dc analysis.  If the area  factor  is  omitted,  a
  1644.  
  1645.           value  of  1.0  is  assumed.   The  (optional)  initial condition
  1646.  
  1647.           specification using IC=VBE,VCE is intended for use with  the  UIC
  1648.  
  1649.           option  on  the  .TRAN card, when a transient analysis is desired
  1650.  
  1651.           starting from other than the quiescent operating point.  See  the
  1652.  
  1653.           .IC  card  description  for a better way to set transient initial
  1654.  
  1655.           conditions.
  1656.  
  1657.  
  1658.  
  1659.           7.3.  Junction Field-Effect Transistors (JFET's)
  1660.  
  1661.           General form:
  1662.  
  1663.  
  1664.               JXXXXXXX ND NG NS MNAME <AREA> <OFF> <IC=VDS,VGS>
  1665.  
  1666.  
  1667.           Examples:
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.                                                                          28
  1675.  
  1676.  
  1677.               J1 7 2 3 JM1 OFF
  1678.  
  1679.  
  1680.  
  1681.                ND, NG, and NS  are  the  drain,  gate,  and  source  nodes,
  1682.  
  1683.           respectively.   MNAME is the model name, AREA is the area factor,
  1684.  
  1685.           and OFF indicates an (optional) initial condition on  the  device
  1686.  
  1687.           for  dc  analysis.  If the area factor is omitted, a value of 1.0
  1688.  
  1689.           is assumed.   The  (optional)  initial  condition  specification,
  1690.  
  1691.           using  IC=VDS,VGS  is intended for use with the UIC option on the
  1692.  
  1693.           .TRAN card, when a transient analysis is  desired  starting  from
  1694.  
  1695.           other  than the quiescent operating point (see the .IC card for a
  1696.  
  1697.           better way to set initial conditions).
  1698.  
  1699.  
  1700.  
  1701.           7.4.  MOSFET's
  1702.  
  1703.  
  1704.           General form:
  1705.  
  1706.  
  1707.               MXXXXXXX ND NG NS NB MNAME <L=VAL> <W=VAL> <AD=VAL> <AS=VAL>
  1708.               + <PD=VAL> <PS=VAL> <NRD=VAL> <NRS=VAL> <OFF> <IC=VDS,VGS,VBS>
  1709.  
  1710.  
  1711.           Examples:
  1712.  
  1713.  
  1714.               M1 24 2 0 20 TYPE1
  1715.               M31 2 17 6 10 MODM L=5U W=2U
  1716.               M31 2 16 6 10 MODM 5U 2U
  1717.               M1 2 9 3 0 MOD1 L=10U W=5U AD=100P AS=100P PD=40U PS=40U
  1718.               M1 2 9 3 0 MOD1 10U 5U 2P 2P
  1719.  
  1720.  
  1721.           ND, NG, NS, and NB are the drain, gate, source,  and  bulk  (sub-
  1722.  
  1723.           strate)  nodes,  respectively.  MNAME is the model name.  L and W
  1724.  
  1725.           are the channel length and width, in meters.  AD and AS  are  the
  1726.  
  1727.           areas  of  the  drain  and source diffusions, in sq-meters.  Note
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.                                                                          29
  1735.  
  1736.  
  1737.           that the suffix U specifies microns (1E-6  m)  and  P  sq-microns
  1738.  
  1739.           (1E-12  sq-m).  If  any  of  L,  W,  AD, or AS are not specified,
  1740.  
  1741.           default values are used.  The user may specify the values  to  be
  1742.  
  1743.           used  for these default parameters on the .OPTIONS card.  The use
  1744.  
  1745.           of defaults simplifies input deck preparation,  as  well  as  the
  1746.  
  1747.           editing  required if device geometries are to be changed.  PD and
  1748.  
  1749.           PS are the perimeters of  the  drain  and  source  junctions,  in
  1750.  
  1751.           meters.   NRD  and NRS designate the equivalent number of squares
  1752.  
  1753.           of the drain and source diffusions;  these  values  multiply  the
  1754.  
  1755.           sheet resistance RSH specified on the .MODEL card for an accurate
  1756.  
  1757.           representation of the parasitic series drain  and  source  resis-
  1758.  
  1759.           tance of each transistor.  PD and PS default to 0.0 while NRD and
  1760.  
  1761.           NRS to 1.0.  OFF indicates an (optional) initial condition on the
  1762.  
  1763.           device for dc analysis.  The (optional) initial condition specif-
  1764.  
  1765.           ication using IC=VDS,VGS,VBS is intended for  use  with  the  UIC
  1766.  
  1767.           option  on  the  .TRAN card, when a transient analysis is desired
  1768.  
  1769.           starting from other than the quiescent operating point.  See  the
  1770.  
  1771.           .IC  card  for  a better and more convenient way to specify tran-
  1772.  
  1773.           sient initial conditions.
  1774.  
  1775.  
  1776.  
  1777.           7.5.  .MODEL Card
  1778.  
  1779.  
  1780.           General form:
  1781.  
  1782.  
  1783.                .MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... )
  1784.  
  1785.  
  1786.           Examples:
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.                                                                          30
  1794.  
  1795.  
  1796.                .MODEL MOD1 NPN BF=50 IS=1E-13 VBF=50
  1797.  
  1798.  
  1799.  
  1800.                The .MODEL card specifies a set  of  model  parameters  that
  1801.  
  1802.           will  be  used  by one or more devices.  MNAME is the model name,
  1803.  
  1804.           and type is one of the following seven types:
  1805.  
  1806.  
  1807.                             NPN    NPN BJT model
  1808.                             PNP    PNP BJT model
  1809.                             D      diode model
  1810.                             NJF    N-channel JFET model
  1811.                             PJF    P-channel JFET model
  1812.                             NMOS   N-channel MOSFET model
  1813.                             PMOS   P-channel MOSFET model
  1814.  
  1815.  
  1816.  
  1817.                Parameter values are  defined  by  appending  the  parameter
  1818.  
  1819.           name,  as  given  below for each model type, followed by an equal
  1820.  
  1821.           sign and the parameter value.   Model  parameters  that  are  not
  1822.  
  1823.           given  a  value  are  assigned the default values given below for
  1824.  
  1825.           each model type.
  1826.  
  1827.  
  1828.  
  1829.           7.6.  Diode Model
  1830.  
  1831.  
  1832.  
  1833.                The dc characteristics of the diode are  determined  by  the
  1834.  
  1835.           parameters  IS  and  N.   An  ohmic  resistance, RS, is included.
  1836.  
  1837.           Charge storage effects are modeled by a transit time, TT,  and  a
  1838.  
  1839.           nonlinear  depletion layer capacitance which is determined by the
  1840.  
  1841.           parameters CJO, VJ, and M.  The  temperature  dependence  of  the
  1842.  
  1843.           saturation  current  is  defined by the parameters EG, the energy
  1844.  
  1845.           and XTI, the saturation current  temperature  exponent.   Reverse
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.                                                                          31
  1853.  
  1854.  
  1855.           breakdown  is  modeled  by an exponential increase in the reverse
  1856.  
  1857.           diode current and is determined by  the  parameters  BV  and  IBV
  1858.  
  1859.           (both of which are positive numbers).
  1860.  
  1861.  
  1862.  
  1863.      name   parameter                        units   default    example    area
  1864.  
  1865.    1   IS     saturation current               A       1.0E-14    1.0E-14    *
  1866.    2   RS     ohmic resistance                 Ohm     0          10         *
  1867.    3   N      emission coefficient             -       1          1.0
  1868.    4   TT     transit-time                     sec     0          0.1Ns
  1869.    5   CJO    zero-bias junction capacitance   F       0          2PF        *
  1870.    6   VJ     junction potential               V       1          0.6
  1871.    7   M      grading coefficient              -       0.5        0.5
  1872.    8   EG     activation energy                eV      1.11       1.11 Si
  1873.                                                                   0.69 Sbd
  1874.                                                                   0.67 Ge
  1875.    9   XTI    saturation-current temp. exp     -       3.0        3.0 jn
  1876.                                                                   2.0 Sbd
  1877.    10   KF     flicker noise coefficient        -       0
  1878.    11   AF     flicker noise exponent           -       1
  1879.    12   FC     coefficient for forward-bias     -       0.5
  1880.                depletion capacitance formula
  1881.    13   BV     reverse breakdown voltage        V       infinite   40.0
  1882.    14   IBV    current at breakdown voltage     A       1.0E-3
  1883.  
  1884.  
  1885.  
  1886.  
  1887.           7.7.  BJT Models (both NPN and PNP)
  1888.  
  1889.  
  1890.                The bipolar junction transistor model in SPICE is an adapta-
  1891.  
  1892.           tion  of  the  integral  charge control model of Gummel and Poon.
  1893.  
  1894.           This modified Gummel-Poon model extends  the  original  model  to
  1895.  
  1896.           include  several  effects  at  high  bias levels.  The model will
  1897.  
  1898.           automatically simplify to the simpler Ebers-Moll model when  cer-
  1899.  
  1900.           tain  parameters  are  not specified. The parameter names used in
  1901.  
  1902.           the modified Gummel-Poon model have been chosen to be more easily
  1903.  
  1904.           understood by the program user, and to reflect better both physi-
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.                                                                          32
  1912.  
  1913.  
  1914.           cal and circuit design thinking.
  1915.  
  1916.  
  1917.                The dc model is defined by the parameters IS, BF,  NF,  ISE,
  1918.  
  1919.           IKF, and NE which determine the forward current gain characteris-
  1920.  
  1921.           tics, IS, BR, NR, ISC, IKR, and NC which  determine  the  reverse
  1922.  
  1923.           current gain characteristics, and VAF and VAR which determine the
  1924.  
  1925.           output conductance for forward and reverse regions.  Three  ohmic
  1926.  
  1927.           resistances  RB,  RC,  and  RE are included, where RB can be high
  1928.  
  1929.           current dependent.  Base charge storage is modeled by forward and
  1930.  
  1931.           reverse  transit  times,  TF  and TR, the forward transit time TF
  1932.  
  1933.           being bias dependent if desired, and  nonlinear  depletion  layer
  1934.  
  1935.           capacitances  which  are  determined by CJE, VJE, and MJE for the
  1936.  
  1937.           B-E junction , CJC, VJC, and MJC for the B-C  junction  and  CJS,
  1938.  
  1939.           VJS,  and  MJS  for  the C-S (Collector-Substrate) junction.  The
  1940.  
  1941.           temperature dependence of the saturation current, IS,  is  deter-
  1942.  
  1943.           mined  by the energy-gap, EG, and the saturation current tempera-
  1944.  
  1945.           ture exponent, XTI.  Additionally base current temperature depen-
  1946.  
  1947.           dence  is modeled by the beta temperature exponent XTB in the new
  1948.  
  1949.           model.
  1950.  
  1951.  
  1952.                The  BJT parameters used in the modified  Gummel-Poon  model
  1953.  
  1954.           are listed below. The parameter names used in earlier versions of
  1955.  
  1956.           SPICE2 are still accepted.
  1957.  
  1958.  
  1959.                   Modified Gummel-Poon BJT Parameters.
  1960.  
  1961.  
  1962.  
  1963.                name   parameter              units   default    example   area
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.                                                                          33
  1971.  
  1972.  
  1973.  1   IS     transport saturation current            A    1.0E-16    1.0E-15   *
  1974.  2    BF     ideal maximum forward beta              -       100        100
  1975.  3    NF     forward current emission coefficient    -       1.0        1
  1976.  4    VAF    forward Early voltage                   V       infinite   200
  1977.  5    IKF    corner for forward beta
  1978.          high current roll-off                       A   infinite   0.01      *
  1979.  6    ISE    B-E leakage saturation current          A   0          1.0E-13   *
  1980.  7    NE     B-E leakage emission coefficient        -       1.5        2
  1981.  8    BR     ideal maximum reverse beta              -       1          0.1
  1982.  9    NR     reverse current emission coefficient    -       1          1
  1983.  10   VAR    reverse Early voltage                   V       infinite   200
  1984.  11   IKR    corner for reverse beta
  1985.          high current roll-off                   A       infinite   0.01      *
  1986.  12   ISC    B-C leakage saturation current          A       0          1.0E-13   *
  1987.  13   NC     B-C leakage emission coefficient        -       2          1.5
  1988.  14   RB     zero bias base resistance               Ohms    0          100   *
  1989.  15   IRB    current where base resistance
  1990.          falls halfway to its min value          A       infinite   0.1       *
  1991.  16   RBM    minimum base resistance
  1992.          at high currents                           Ohms    RB         10     *
  1993.  17   RE     emitter resistance                     Ohms    0          1      *
  1994.  18   RC     collector resistance                    Ohms    0          10    *
  1995.  19   CJE    B-E zero-bias depletion capacitance     F       0          2PF   *
  1996.  20   VJE    B-E built-in potential                  V       0.75       0.6
  1997.  21   MJE    B-E junction exponential factor         -       0.33       0.33
  1998.  22   TF     ideal forward transit time              sec     0          0.1Ns
  1999.  23   XTF    coefficient for bias dependence of TF   -       0
  2000.  24   VTF    voltage describing VBC
  2001.              dependence of TF                        V       infinite
  2002.  25   ITF    high-current parameter
  2003.         for effect on TF                             A       0             *
  2004.  26   PTF    excess phase at freq=1.0/(TF*2PI) Hz    deg     0
  2005.  27   CJC    B-C zero-bias depletion capacitance     F       0      2PF       *
  2006.  28   VJC    B-C built-in potential                  V       0.75       0.5
  2007.  29   MJC    B-C junction exponential factor         -       0.33       0.5
  2008.  30   XCJC   fraction of B-C depletion capacitance   -       1
  2009.              connected to internal base node
  2010.  31   TR     ideal reverse transit time              sec     0          10Ns
  2011.  32   CJS    zero-bias collector-substrate
  2012.                       capacitance                    F       0          2PF   
  2013.  33   VJS    substrate junction built-in potential   V       0.75
  2014.  34   MJS    substrate junction exponential factor   -       0          0.5
  2015.  35   XTB    forward and reverse beta
  2016.              temperature exponent                    -       0
  2017.  36   EG     energy gap for temperature
  2018.              effect on IS                            eV      1.11
  2019.  37   XTI    temperature exponent for effect on IS   -       3
  2020.  38   KF     flicker-noise coefficient               -       0
  2021.  39   AF     flicker-noise exponent                  -       1
  2022.  40   FC     coefficient for forward-bias
  2023.              depletion capacitance formula           -       0.5
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.                                                                          34
  2031.  
  2032.  
  2033.           7.8.  JFET Models (both N and P Channel)
  2034.  
  2035.  
  2036.  
  2037.                The JFET model is derived from the FET model of Shichman and
  2038.  
  2039.           Hodges.  The dc characteristics are defined by the parameters VTO
  2040.  
  2041.           and BETA, which determine the variation  of  drain  current  with
  2042.  
  2043.           gate  voltage,  LAMBDA,  which determines the output conductance,
  2044.  
  2045.           and IS, the saturation current of the two  gate  junctions.   Two
  2046.  
  2047.           ohmic  resistances,  RD  and RS, are included.  Charge storage is
  2048.  
  2049.           modeled by nonlinear depletion layer capacitances for  both  gate
  2050.  
  2051.           junctions  which  vary  as the -1/2 power of junction voltage and
  2052.  
  2053.           are defined by the parameters CGS, CGD, and PB.
  2054.  
  2055.  
  2056.  name     parameter                          units    default   example   area
  2057.  
  2058.  1   VTO      threshold voltage                    V        -2.0      -2.0
  2059.  2   BETA     transconductance parameter         A/V**2   1.0E-4    1.0E-3    *
  2060.  3   LAMBDA   channel length modulation
  2061.              parameter                            1/V      0         1.0E-4
  2062.  4   RD       drain ohmic resistance             Ohm      0         100       *
  2063.  5   RS     source ohmic resistance              Ohm      0         100       *
  2064.  6   CGS    zero-bias G-S junction capacitance   F        0         5PF       *
  2065.  7   CGD    zero-bias G-D junction capacitance   F        0         1PF       *
  2066.  8   PB       gate junction potential              V        1         0.6
  2067.  9   IS     gate junction saturation current     A        1.0E-14   1.0E-14   *
  2068.  10   KF       flicker noise coefficient            -        0
  2069.  11   AF       flicker noise exponent               -        1
  2070.  12   FC       coefficient for forward-bias         -        0.5
  2071.                         depletion capacitance formula
  2072.  
  2073.  
  2074.  
  2075.  
  2076.           7.9.  MOSFET Models (both N and P channel)
  2077.  
  2078.  
  2079.                SPICE provides three MOSFET device models  which  differ  in
  2080.  
  2081.           the  formulation  of  the I-V characteristic.  The variable LEVEL
  2082.  
  2083.           specifies the model to be used:
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.                                                                          35
  2091.  
  2092.  
  2093.                  LEVEL=1 ->    Shichman-Hodges
  2094.                  LEVEL=2 ->    MOS2 (as described in [1])
  2095.                  LEVEL=3 ->    MOS3, a semi-empirical model(see [1])
  2096.  
  2097.  
  2098.  
  2099.           The dc characteristics of the MOSFET are defined  by  the  device
  2100.  
  2101.           parameters  VTO,  KP, LAMBDA, PHI and GAMMA. These parameters are
  2102.  
  2103.           computed by SPICE if process  parameters  (NSUB,  TOX,  ...)  are
  2104.  
  2105.           given,  but  user-specified values always override.  VTO is posi-
  2106.  
  2107.           tive (negative) for enhancement mode and negative (positive)  for
  2108.  
  2109.           depletion  mode  N-channel (P-channel) devices. Charge storage is
  2110.  
  2111.           modeled by three constant capacitors, CGSO, CGDO, and CGBO  which
  2112.  
  2113.           represent overlap capacitances, by the nonlinear thin-oxide capa-
  2114.  
  2115.           citance which is distributed among the gate, source,  drain,  and
  2116.  
  2117.           bulk  regions,  and by the nonlinear depletion-layer capacitances
  2118.  
  2119.           for both substrate junctions divided into bottom  and  periphery,
  2120.  
  2121.           which  vary  as the MJ and MJSW power of junction voltage respec-
  2122.  
  2123.           tively, and are determined by the parameters CBD, CBS, CJ,  CJSW,
  2124.  
  2125.           MJ,  MJSW  and  PB.   There are two built-in models of the charge
  2126.  
  2127.           storage effects associated with the thin-oxide.  The  default  is
  2128.  
  2129.           the piecewise linear voltage-dependent capacitance model proposed
  2130.  
  2131.           by Meyer.  The second choice is the charge-controlled capacitance
  2132.  
  2133.           model  of Ward and Dutton [1].  The XQC model parameter acts as a
  2134.  
  2135.           flag and a coefficient at the same time.  As the former it causes
  2136.  
  2137.           the  program to use Meyer's model whenever larger than 0.5 or not
  2138.  
  2139.           specified, and the charge-controlled model  when  between  0  and
  2140.  
  2141.           0.5.  In the latter case its value defines the share of the chan-
  2142.  
  2143.           nel charge associated with the drain terminal in  the  saturation
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.                                                                          36
  2151.  
  2152.  
  2153.           region.   The  thin-oxide  charge  storage  effects  are  treated
  2154.  
  2155.           slightly  different  for  the  LEVEL=1  model.   These   voltage-
  2156.  
  2157.           dependent  capacitances  are included only if TOX is specified in
  2158.  
  2159.           the input description and they are represented using Meyer's for-
  2160.  
  2161.           mulation.
  2162.  
  2163.  
  2164.                There is some overlap among the  parameters  describing  the
  2165.  
  2166.           junctions, e.g. the reverse current can be input either as IS (in
  2167.  
  2168.           A) or as JS (in A/m**2). Whereas the first is an  absolute  value
  2169.  
  2170.           the second is multiplied by AD and AS to give the reverse current
  2171.  
  2172.           of the drain and source junctions respectively. This  methodology
  2173.  
  2174.           has  been chosen since there is no sense in relating always junc-
  2175.  
  2176.           tion characteristics with AD and AS entered on the  device  card;
  2177.  
  2178.           the  areas  can  be defaulted.  The same idea applies also to the
  2179.  
  2180.           zero-bias junction capacitances CBD and CBS (in F) on  one  hand,
  2181.  
  2182.           and  CJ (in F/m**2) on the other.  The parasitic drain and source
  2183.  
  2184.           series resistance can be expressed as either RD and RS (in  ohms)
  2185.  
  2186.           or  RSH  (in ohms/sq.), the latter being multiplied by the number
  2187.  
  2188.           of squares NRD and NRS input on the device card.
  2189.  
  2190.  
  2191.  
  2192.  name     parameter                           units       default   example
  2193.  
  2194.  1    LEVEL    model index                         -           1
  2195.  2    VTO      zero-bias threshold voltage         V           0.0       1.0
  2196.  3    KP       transconductance parameter         A/V**2      2.0E-5    3.1E-5
  2197.  4    GAMMA    bulk threshold parameter             V**0.5      0.0       0.37
  2198.  5    PHI      surface potential                     V           0.6       0.65
  2199.  6    LAMBDA   channel-length modulation
  2200.             (MOS1 and MOS2 only)                    1/V         0.0       0.02
  2201.  7    RD       drain ohmic resistance                 Ohm         0.0       1.0
  2202.  8    RS       source ohmic resistance                Ohm         0.0       1.0
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.                                                                          37
  2210.  
  2211.  
  2212. 9    CBD      zero-bias B-D junction capacitance      F          0.0       20FF
  2213. 10   CBS      zero-bias B-S junction capacitance      F          0.0       20FF
  2214. 11   IS       bulk junction saturation current        A         1.0E-14 1.0E-15
  2215. 12   PB       bulk junction potential                 V           0.8     0.87
  2216. 13   CGSO     gate-source overlap capacitance
  2217.           per meter channel width                 F/m         0.0       4.0E-11
  2218. 14   CGDO     gate-drain overlap capacitance
  2219.           per meter channel width                 F/m         0.0       4.0E-11
  2220. 15   CGBO     gate-bulk overlap capacitance
  2221.           per meter channel length                F/m         0.0       2.0E-10
  2222. 16   RSH      drain and source diffusio
  2223.             sheet resisitance                       Ohm/sq.     0.0       10.0
  2224.  17   CJ       zero-bias bulk junction bottom cap.
  2225.           per sq-meter of junction area              F/m**2    0.0       2.0E-4
  2226. 18   MJ       bulk junction bottom grading coef.      -           0.5       0.5
  2227. 19   CJSW     zero-bias bulk junction sidewall cap
  2228.           per meter of junction perimeter            F/m       0.0       1.0E-9
  2229. 20   MJSW     bulk junction sidewall grading coef.    -           0.33
  2230. 21   JS       bulk junction saturation current
  2231.             per sq-meter of junction area            A/m**2              1.0E-8
  2232. 22   TOX      oxide thickness                         meter       1.0E-7 1.0E-7
  2233. 23   NSUB     substrate doping                        1/cm**3     0.0    4.0E15
  2234. 24   NSS      surface state density                   1/cm**2     0.0    1.0E10
  2235. 25   NFS      fast surface state density              1/cm**2     0.0    1.0E10
  2236. 26   TPG      type of gate material:                  -           1.0
  2237.               +1 opp. to substrate
  2238.               -1 same as substrate
  2239.                0  Al gate
  2240. 27   XJ       metallurgical junction depth            meter       0.0       1U
  2241. 28   LD       lateral diffusion                       meter       0.0     0.8U
  2242. 29   UO       surface mobility                        cm**2/V-s   600       700
  2243. 30   UCRIT    critical field for mobility
  2244.            degradation (MOS2 only)                 V/cm        1.0E4     1.0E4
  2245. 31   UEXP     critical field exponent in
  2246.             mobility degradation (MOS2 only)        -           0.0       0.1
  2247. 32   UTRA     transverse field coef (mobility)
  2248.             (deleted for MOS2)                      -           0.0       0.3
  2249. 33   VMAX     maximum drift velocity of carriers      m/s         0.0    5.0E4
  2250. 34   NEFF     total channel charge (fixed and
  2251.              mobile) coefficient (MOS2 only)         -           1.0       5.0
  2252. 35   XQC      thin-oxide capacitance model flag
  2253.               and coefficient of channel charge
  2254.               share attributed to drain (0-0.5)       -           1.0       0.4
  2255. 36   KF       flicker noise coefficient               -           0.0   1.0E-26
  2256. 37   AF       flicker noise exponent                  -           1.0       1.2
  2257. 38   FC       coefficient for forward-bias
  2258.               depletion capacitance formula           -           0.5
  2259. 39   DELTA    width effect on threshold voltage
  2260.              (MOS2 and MOS3)                         -           0.0       1.0
  2261. 40   THETA    mobility modulation (MOS3 only)         1/V         0.0       0.1
  2262. 41   ETA      static feedback (MOS3 only)             -           0.0       1.0
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.                                                                          38
  2270.  
  2271.  
  2272. 42   KAPPA    saturation field factor (MOS3 only)     -           0.2       0.5
  2273.  
  2274.  
  2275.  
  2276.           [1] A. Vladimirescu and S. Liu, "The Simulation of MOS Integrated
  2277.  
  2278.           Circuits  Using  SPICE2",  ERL  Memo  No.  ERL  M80/7,Electronics
  2279.  
  2280.           Research Laboratory, University  of  California,  Berkeley,  Oct.
  2281.  
  2282.           1980.
  2283.  
  2284.  
  2285.  
  2286.  
  2287.           8.  SUBCIRCUITS
  2288.  
  2289.  
  2290.  
  2291.                A subcircuit that consists of SPICE elements can be  defined
  2292.  
  2293.           and  referenced  in a fashion similar to device models.  The sub-
  2294.  
  2295.           circuit is defined in the input deck by  a  grouping  of  element
  2296.  
  2297.           cards;   the program then automatically inserts the group of ele-
  2298.  
  2299.           ments wherever the subcircuit is referenced.  There is  no  limit
  2300.  
  2301.           on  the  size  or  complexity of subcircuits, and subcircuits may
  2302.  
  2303.           contain other subcircuits.  An example  of  subcircuit  usage  is
  2304.  
  2305.           given in Appendix A.
  2306.  
  2307.  
  2308.  
  2309.           8.1.  .SUBCKT Card
  2310.  
  2311.           General form:
  2312.  
  2313.  
  2314.                .SUBCKT subnam N1 <N2 N3 ...>
  2315.  
  2316.  
  2317.           Examples:
  2318.  
  2319.  
  2320.                .SUBCKT OPAMP 1 2 3 4
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.                                                                          39
  2328.  
  2329.  
  2330.                A circuit definition is begun with a .SUBCKT  card.   SUBNAM
  2331.  
  2332.           is  the  subcircuit name, and N1, N2, ... are the external nodes,
  2333.  
  2334.           which cannot be zero.  The group of element cards  which  immedi-
  2335.  
  2336.           ately  follow  the  .SUBCKT card define the subcircuit.  The last
  2337.  
  2338.           card in a subcircuit definition is the .ENDS  card  (see  below).
  2339.  
  2340.           Control  cards  may  not  appear  within a subcircuit definition;
  2341.  
  2342.           however,  subcircuit  definitions  may  contain  anything   else,
  2343.  
  2344.           including  other  subcircuit definitions, device models, and sub-
  2345.  
  2346.           circuit calls (see below).  Note that any device models  or  sub-
  2347.  
  2348.           circuit  definitions  included as part of a subcircuit definition
  2349.  
  2350.           are strictly local (i.e., such models  and  definitions  are  not
  2351.  
  2352.           known  outside  the  subcircuit  definition).   Also, any element
  2353.  
  2354.           nodes not included on the .SUBCKT card are strictly  local,  with
  2355.  
  2356.           the exception of 0 (ground) which is always global.
  2357.  
  2358.  
  2359.  
  2360.           8.2.  .ENDS Card
  2361.  
  2362.  
  2363.           General form:
  2364.  
  2365.  
  2366.                .ENDS <SUBNAM>
  2367.  
  2368.  
  2369.           Examples:
  2370.  
  2371.  
  2372.                .ENDS OPAMP
  2373.  
  2374.  
  2375.  
  2376.                This card must be the last one for  any  subcircuit  defini-
  2377.  
  2378.           tion.   The subcircuit name, if included, indicates which subcir-
  2379.  
  2380.           cuit definition is being terminated;  if omitted, all subcircuits
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.                                                                          40
  2388.  
  2389.  
  2390.           being  defined  are  terminated.   The  name  is needed only when
  2391.  
  2392.           nested subcircuit definitions are being made.
  2393.  
  2394.  
  2395.  
  2396.           8.3.  Subcircuit Calls
  2397.  
  2398.  
  2399.           General form:
  2400.  
  2401.  
  2402.               XYYYYYYY N1 <N2 N3 ...> SUBNAM
  2403.  
  2404.  
  2405.           Examples:
  2406.  
  2407.  
  2408.               X1 2 4 17 3 1 MULTI
  2409.  
  2410.  
  2411.  
  2412.                Subcircuits are used in SPICE by specifying  pseudo-elements
  2413.  
  2414.           beginning  with the letter X, followed by the circuit nodes to be
  2415.  
  2416.           used in expanding the subcircuit.
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.                                                                          41
  2424.  
  2425.  
  2426.           9.  CONTROL CARDS
  2427.  
  2428.  
  2429.  
  2430.           9.1.  .TEMP Card
  2431.  
  2432.  
  2433.           General form:
  2434.  
  2435.  
  2436.                .TEMP T1 <T2 <T3 ...>>
  2437.  
  2438.  
  2439.           Examples:
  2440.  
  2441.  
  2442.                .TEMP -55.0 25.0 125.0
  2443.  
  2444.  
  2445.  
  2446.                This card specifies the temperatures at which the circuit is
  2447.  
  2448.           to  be simulated.  T1, T2, ... Are the different temperatures, in
  2449.  
  2450.           degrees C.  Temperatures less than  -223.0  deg  C  are  ignored.
  2451.  
  2452.           Model  data  are specified at TNOM degrees (see the .OPTIONS card
  2453.  
  2454.           for TNOM);  if the .TEMP card is  omitted,  the  simulation  will
  2455.  
  2456.           also be performed at a temperature equal to TNOM.
  2457.  
  2458.  
  2459.  
  2460.           9.2.  .WIDTH Card
  2461.  
  2462.           General form:
  2463.  
  2464.  
  2465.                .WIDTH IN=COLNUM OUT=COLNUM
  2466.  
  2467.  
  2468.           Examples:
  2469.  
  2470.  
  2471.                .WIDTH IN=72 OUT=133
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.                                                                          42
  2479.  
  2480.  
  2481.                COLNUM is the last column read from each line of input;  the
  2482.  
  2483.           setting  takes effect with the next line read.  The default value
  2484.  
  2485.           for COLNUM is 80.  The out parameter specifies the  output  print
  2486.  
  2487.           width.   Permissible values for the output print width are 80 and
  2488.  
  2489.           133.
  2490.  
  2491.  
  2492.  
  2493.           9.3.  .OPTIONS Card
  2494.  
  2495.  
  2496.           General form:
  2497.  
  2498.  
  2499.                .OPTIONS OPT1 OPT2 ... (or OPT=OPTVAL ...)
  2500.  
  2501.  
  2502.           Examples:
  2503.  
  2504.  
  2505.                .OPTIONS ACCT LIST NODE
  2506.  
  2507.  
  2508.  
  2509.                This card allows the user to reset program control and  user
  2510.  
  2511.           options for specific simulation purposes.  Any combination of the
  2512.  
  2513.           following options may be included, in  any  order.   'x'  (below)
  2514.  
  2515.           represents some positive number.
  2516.  
  2517.  
  2518.           option                                              effect
  2519.  
  2520.           ACCT         causes accounting and run time statistics to be printed
  2521.           LIST       causes the summary listing of the input data to be printed
  2522.           NOMOD        suppresses the printout of the model parameters.
  2523.           NOPAGE       suppresses page ejects
  2524.           NODE         causes the printing of the node table.
  2525.           OPTS         causes the option values to be printed.
  2526.           GMIN=x       resets the value of GMIN, the minimum conductance
  2527.                        allowed by the program.  The default value is 1.0E-12.
  2528.           RELTOL=x     resets the relative error tolerance of the program.  The
  2529.                        default value is 0.001 (0.1 percent).
  2530.           ABSTOL=x     resets the absolute current error tolerance of the
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.                                                                          43
  2538.  
  2539.  
  2540.                           program.  The default value is 1 picoamp.
  2541.           VNTOL=x         resets the absolute voltage error tolerance of the
  2542.                           program.  The default value is 1 microvolt.
  2543.           TRTOL=x      resets the transient error tolerance.  The default value
  2544.                        is 7.0.  This parameter is an estimate of the factor by
  2545.                        which SPICE overestimates the actual truncation error.
  2546.           CHGTOL=x     resets the charge tolerance of the program.  The default
  2547.                           value is 1.0E-14.
  2548.           PIVTOL=x        resets the absolute minimum value for a matrix entry
  2549.                      to be accepted as a pivot.  The default value is 1.0E-13.
  2550.           PIVREL=x   resets the relative ratio between the largest column entry
  2551.                     and an acceptable pivot value. The default value is 1.0E-3.
  2552.                      In the numerical pivoting algorithm the allowed minimum
  2553.                      pivot value is determined by
  2554.                            EPSREL=AMAX1(PIVREL*MAXVAL,PIVTOL)
  2555.                      where MAXVAL is the maximum element in the column where
  2556.                      a pivot is sought (partial pivoting).
  2557.           NUMDGT=x         resets the number of significant digits printed for
  2558.                            output variable values.  X must satisfy the relation
  2559.                      0 < x < 8.  The default value is 4.  Note:  this option is
  2560.                      independent of the error tolerance used by SPICE (i.e., if
  2561.                     the values of options RELTOL, ABSTOL, etc., are not changed
  2562.                     then one may be printing numerical 'noise' for NUMDGT > 4.
  2563.           TNOM=x        resets the nominal temperature.  The default value is
  2564.                         27 deg C (300 deg K).
  2565.           ITL1=x        resets the dc iteration limit.  The default is 100.
  2566.           ITL2=x        resets the dc transfer curve iteration limit.  The
  2567.                         default is 50.
  2568.           ITL3=x        resets the lower transient analysis iteration limit.
  2569.                         the default value is 4.
  2570.           ITL4=x       resets the transient analysis timepoint iteration limit.
  2571.                        the default is 10.
  2572.           ITL5=x       resets the transient analysis total iteration limit.
  2573.                        the default is 5000.  Set ITL5=0 to omit this test.
  2574.           ITL6=x  resets the dc iteration limit at each step of the source
  2575.                   stepping method.  The default is 0 which means not to use
  2576.                   this method.  
  2577.           CPTIME=x      the maximum cpu-time in seconds allowed for this job.
  2578.           LIMTIM=x      resets the amount of cpu time reserved by SPICE for
  2579.                         generating plots should a cpu time-limit cause job
  2580.                         termination.  The default value is 2 (seconds).
  2581.           LIMPTS=x      resets the total number of points that can be printed
  2582.                         or plotted in a dc, ac, or transient analysis.  The
  2583.                         default value is 201.
  2584.           LVLCOD=x      if x is 2 (two), then machine code for the matrix
  2585.                      solution will be generated.  Otherwise, no machine code is
  2586.                      generated.  The default value is 2.  Applies only to CDC
  2587.                      computers.
  2588.           LVLTIM=x     if x is 1 (one), the iteration timestep control is used.
  2589.                        if x is 2 (two), the truncation-error timestep is used.
  2590.                     The default value is 2.  If method=Gear and MAXORD>2 then
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.                                                                          44
  2598.  
  2599.  
  2600.                           LVLTIM is set to 2 by SPICE.
  2601.           METHOD=name     sets the numerical integration method used by SPICE.
  2602.                         Possible names are Gear or trapezoidal.  The default is
  2603.                         trapezoidal.
  2604.           MAXORD=x      sets the maximum order for the integration method if
  2605.                        Gear's variable-order method is used.  X must be between
  2606.                        2 and 6.  The default value is 2.
  2607.           DEFL=x        resets the value for MOS channel length; the default
  2608.                         is 100.0 micrometer.
  2609.           DEFW=x        resets the value for MOS channel width; the default
  2610.                         is 100.0 micrometer.
  2611.           DEFAD=x       resets the value for MOS drain diffusion area; the
  2612.                         default is 0.0.
  2613.           DEFAS=x       resets the value for MOS source diffusion area; the
  2614.                         default is 0.0.
  2615.  
  2616.  
  2617.  
  2618.  
  2619.           9.4.  .OP Card
  2620.  
  2621.  
  2622.           General form:
  2623.  
  2624.  
  2625.                .OP
  2626.  
  2627.  
  2628.  
  2629.  
  2630.                The inclusion of this card in an input deck will force SPICE
  2631.  
  2632.           to determine the dc operating point of the circuit with inductors
  2633.  
  2634.           shorted and capacitors opened.  Note:  a dc analysis is automati-
  2635.  
  2636.           cally  performed  prior  to a transient analysis to determine the
  2637.  
  2638.           transient initial conditions, and prior  to  an  ac  small-signal
  2639.  
  2640.           analysis  to  determine  the  linearized, small-signal models for
  2641.  
  2642.           nonlinear devices.
  2643.  
  2644.  
  2645.                SPICE performs a dc operating point  analysis  if  no  other
  2646.  
  2647.           analyses are requested.
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.                                                                          45
  2655.  
  2656.  
  2657.           9.5.  .DC Card
  2658.  
  2659.  
  2660.           General form:
  2661.  
  2662.  
  2663.                .DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2]
  2664.  
  2665.  
  2666.           Examples:
  2667.  
  2668.  
  2669.                .DC VIN 0.25 5.0 0.25
  2670.                .DC VDS 0 10 .5 VGS 0 5 1
  2671.                .DC VCE 0 10 .25 IB 0 10U 1U
  2672.  
  2673.  
  2674.  
  2675.                This card defines the dc transfer  curve  source  and  sweep
  2676.  
  2677.           limits.   SRCNAM is the name of an independent voltage or current
  2678.  
  2679.           source.  VSTART, VSTOP, and VINCR are the  starting,  final,  and
  2680.  
  2681.           incrementing  values  respectively.  The first example will cause
  2682.  
  2683.           the value of the voltage source VIN to be swept from  0.25  Volts
  2684.  
  2685.           to 5.0 Volts in increments of 0.25 Volts.  A second source (SRC2)
  2686.  
  2687.           may optionally be specified with associated sweep parameters.  In
  2688.  
  2689.           this case, the first source will be swept over its range for each
  2690.  
  2691.           value of the second  source.   This  option  can  be  useful  for
  2692.  
  2693.           obtaining  semiconductor  device output characteristics.  See the
  2694.  
  2695.           second example data deck in that section of the guide.
  2696.  
  2697.  
  2698.  
  2699.           9.6.  .NODESET Card
  2700.  
  2701.           General form:
  2702.  
  2703.  
  2704.                .NODESET V(NODNUM)=VAL V(NODNUM)=VAL ...
  2705.  
  2706.  
  2707.           Examples:
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.                                                                          46
  2715.  
  2716.  
  2717.                .NODESET V(12)=4.5 V(4)=2.23
  2718.  
  2719.  
  2720.  
  2721.                This card helps the program find the dc or initial transient
  2722.  
  2723.           solution  by  making  a preliminary pass with the specified nodes
  2724.  
  2725.           held to the given voltages.  The restriction is then released and
  2726.  
  2727.           the  iteration continues to the true solution.  The .NODESET card
  2728.  
  2729.           may be necessary for convergence on bistable or astable circuits.
  2730.  
  2731.           In general, this card should not be necessary.
  2732.  
  2733.  
  2734.  
  2735.           9.7.  .IC Card
  2736.  
  2737.  
  2738.           General form:
  2739.  
  2740.  
  2741.                .IC V(NODNUM)=VAL V(NODNUM)=VAL ...
  2742.  
  2743.  
  2744.           Examples:
  2745.  
  2746.  
  2747.                .IC V(11)=5 V(4)=-5 V(2)=2.2
  2748.  
  2749.  
  2750.  
  2751.                This card is for setting transient initial  conditions.   It
  2752.  
  2753.           has  two  different interpretations, depending on whether the UIC
  2754.  
  2755.           parameter is specified on the .TRAN card.  Also, one  should  not
  2756.  
  2757.           confuse  this  card with the .NODESET card.  The .NODESET card is
  2758.  
  2759.           only to help dc convergence, and does not affect final bias solu-
  2760.  
  2761.           tion (except for multi-stable circuits).  The two interpretations
  2762.  
  2763.           of this card are as follows:
  2764.  
  2765.  
  2766.            1.  When the UIC parameter is specified on the .TRAN card,  then
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.                                                                          47
  2774.  
  2775.  
  2776.           the  node  voltages specified on the .IC card are used to compute
  2777.  
  2778.           the capacitor, diode, BJT, JFET, and MOSFET  initial  conditions.
  2779.  
  2780.           This  is  equivalent  to  specifying the IC=... parameter on each
  2781.  
  2782.           device card, but is much more convenient.  The  IC=...  parameter
  2783.  
  2784.           can  still  be  specified  and  will take precedence over the .IC
  2785.  
  2786.           values.  Since no dc bias (initial transient)  solution  is  com-
  2787.  
  2788.           puted  before  the  transient  analysis,  one should take care to
  2789.  
  2790.           specify all dc source voltages on the .IC card if they are to  be
  2791.  
  2792.           used to compute device initial conditions.
  2793.  
  2794.  
  2795.            2.  When the UIC parameter is not specified on the  .TRAN  card,
  2796.  
  2797.           the  dc bias (initial transient) solution will be computed before
  2798.  
  2799.           the transient analysis.  In this case, the node  voltages  speci-
  2800.  
  2801.           fied on the .IC card will be forced to the desired initial values
  2802.  
  2803.           during the bias solution.  During transient  analysis,  the  con-
  2804.  
  2805.           straint on these node voltages is removed.
  2806.  
  2807.  
  2808.  
  2809.           9.8.  .TF Card
  2810.  
  2811.  
  2812.           General form:
  2813.  
  2814.  
  2815.                .TF OUTVAR INSRC
  2816.  
  2817.  
  2818.           Examples:
  2819.  
  2820.  
  2821.                .TF V(5,3) VIN
  2822.                .TF I(VLOAD) VIN
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.                                                                          48
  2830.  
  2831.  
  2832.                This card defines the small-signal output and input for  the
  2833.  
  2834.           dc  small-  signal  analysis.   OUTVAR is the small-signal output
  2835.  
  2836.           variable and INSRC is the small-signal  input  source.   If  this
  2837.  
  2838.           card is included, SPICE will compute the dc small-signal value of
  2839.  
  2840.           the transfer function (output/input), input resistance, and  out-
  2841.  
  2842.           put  resistance.   For the first example, SPICE would compute the
  2843.  
  2844.           ratio of V(5,3) to VIN, the small-signal input resistance at VIN,
  2845.  
  2846.           and  the  small-signal  output resistance measured across nodes 5
  2847.  
  2848.           and 3.
  2849.  
  2850.  
  2851.  
  2852.           9.9.  .SENS Card
  2853.  
  2854.  
  2855.           General form:
  2856.  
  2857.  
  2858.                .SENS OV1 <OV2 ... >
  2859.  
  2860.  
  2861.           Examples:
  2862.  
  2863.  
  2864.                .SENS V(9) V(4,3) V(17) I(VCC)
  2865.  
  2866.  
  2867.  
  2868.                If a .SENS card is included in the input  deck,  SPICE  will
  2869.  
  2870.           determine  the  dc  small-signal  sensitivities of each specified
  2871.  
  2872.           output variable with respect to every circuit  parameter.   Note:
  2873.  
  2874.           for large circuits, large amounts of output can be generated.
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.                                                                          49
  2882.  
  2883.  
  2884.           9.10.  .AC Card
  2885.  
  2886.  
  2887.           General form:
  2888.  
  2889.  
  2890.                .AC DEC ND FSTART FSTOP
  2891.                .AC OCT NO FSTART FSTOP
  2892.                .AC LIN NP FSTART FSTOP
  2893.  
  2894.  
  2895.           Examples:
  2896.  
  2897.  
  2898.                .AC DEC 10 1 10K
  2899.                .AC DEC 10 1K 100MEG
  2900.                .AC LIN 100 1 100HZ
  2901.  
  2902.  
  2903.  
  2904.  
  2905.                DEC stands for decade variation, and ND  is  the  number  of
  2906.  
  2907.           points  per  decade.   OCT stands for octave variation, and NO is
  2908.  
  2909.           the number of points per octave.  LIN stands  for  linear  varia-
  2910.  
  2911.           tion,  and  NP  is  the number of points.  FSTART is the starting
  2912.  
  2913.           frequency, and FSTOP is the final frequency.   If  this  card  is
  2914.  
  2915.           included  in  the  deck, SPICE will perform an ac analysis of the
  2916.  
  2917.           circuit over the specified frequency range.  Note that  in  order
  2918.  
  2919.           for  this  analysis  to  be  meaningful, at least one independent
  2920.  
  2921.           source must have been specified with an ac value.
  2922.  
  2923.  
  2924.  
  2925.           9.11.  .DISTO Card
  2926.  
  2927.           General form:
  2928.  
  2929.  
  2930.                .DISTO RLOAD <INTER <SKW2 <REFPWR <SPW2>>>>
  2931.  
  2932.  
  2933.           Examples:
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.                                                                          50
  2941.  
  2942.  
  2943.                .DISTO RL 2 0.95 1.0E-3 0.75
  2944.  
  2945.  
  2946.  
  2947.  
  2948.                This card controls whether SPICE will compute the distortion
  2949.  
  2950.           characteristic of the circuit in a small-signal mode as a part of
  2951.  
  2952.           the  ac  small-signal  sinusoidal  steady-state  analysis.    The
  2953.  
  2954.           analysis is performed assuming that one or two signal frequencies
  2955.  
  2956.           are imposed at the input;  let the two  frequencies  be  f1  (the
  2957.  
  2958.           nominal  analysis frequency) and f2 (=SKW2*f1).  The program then
  2959.  
  2960.           computes the following distortion measures:
  2961.  
  2962.  
  2963.               HD2  - the magnitude of the frequency component 2*f1 assuming
  2964.  
  2965.           that f2
  2966.  
  2967.                      is not present.
  2968.  
  2969.               HD3  - the magnitude of the frequency component 3*f1 assuming
  2970.  
  2971.           that f2
  2972.  
  2973.                      is not present.
  2974.  
  2975.               SIM2 - the magnitude of the frequency component f1 + f2.
  2976.  
  2977.               DIM2 - the magnitude of the frequency component f1 - f2.
  2978.  
  2979.               DIM3 - the magnitude of the frequency component 2*f1 - f2.
  2980.  
  2981.  
  2982.                RLOAD is the name of the output load resistor into which all
  2983.  
  2984.           distortion  power  products  are  to  be  computed.  INTER is the
  2985.  
  2986.           interval at which the summary printout of  the  contributions  of
  2987.  
  2988.           all  nonlinear  devices to the total distortion is to be printed.
  2989.  
  2990.           If omitted or set to zero, no  summary  printout  will  be  made.
  2991.  
  2992.           REFPWR is the reference power level used in computing the distor-
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.                                                                          51
  3000.  
  3001.  
  3002.           tion products; if omitted, a value of 1  mW  (that  is,  dbm)  is
  3003.  
  3004.           used.  SKW2 is the ratio of f2 to f1.  If omitted, a value of 0.9
  3005.  
  3006.           is used (i.e., f2 = 0.9*f1).  SPW2 is the amplitude  of  f2.   If
  3007.  
  3008.           omitted, a value of 1.0 is assumed.
  3009.  
  3010.  
  3011.                The distortion measures HD2, HD3, SIM2, DIM2, and  DIM3  may
  3012.  
  3013.           also  be  be  printed  and/or plotted (see the description of the
  3014.  
  3015.           .PRINT and .PLOT cards).
  3016.  
  3017.  
  3018.  
  3019.           9.12.  .NOISE Card
  3020.  
  3021.  
  3022.           General form:
  3023.  
  3024.  
  3025.                .NOISE OUTV INSRC NUMS
  3026.  
  3027.  
  3028.           Examples:
  3029.  
  3030.  
  3031.                .NOISE V(5) VIN 10
  3032.  
  3033.  
  3034.  
  3035.                This card controls the noise analysis of the  circuit.   The
  3036.  
  3037.           noise  analysis  is performed in conjunction with the ac analysis
  3038.  
  3039.           (see .AC card). OUTV is an output voltage which defines the  sum-
  3040.  
  3041.           ming  point.   INSRC  is  the  name of the independent voltage or
  3042.  
  3043.           current source which is the noise input reference.  NUMS  is  the
  3044.  
  3045.           summary interval.  SPICE will compute the equivalent output noise
  3046.  
  3047.           at the specified output as well as the equivalent input noise  at
  3048.  
  3049.           the  specified  input.   In  addition, the contributions of every
  3050.  
  3051.           noise generator in the circuit will be printed at every NUMS fre-
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.                                                                          52
  3059.  
  3060.  
  3061.           quency  points  (the summary interval).  If NUMS is zero, no sum-
  3062.  
  3063.           mary printout will be made.
  3064.  
  3065.  
  3066.                The output noise and the equivalent input noise may also  be
  3067.  
  3068.           printed  and/or  plotted  (see  the description of the .PRINT and
  3069.  
  3070.           .PLOT cards).
  3071.  
  3072.  
  3073.  
  3074.           9.13.  .TRAN Card
  3075.  
  3076.  
  3077.           General form:
  3078.  
  3079.  
  3080.                .TRAN TSTEP TSTOP <TSTART <TMAX>> <UIC>
  3081.  
  3082.  
  3083.           Examples:
  3084.  
  3085.  
  3086.                .TRAN 1NS 100NS
  3087.                .TRAN 1NS 1000NS 500NS
  3088.                .TRAN 10NS 1US UIC
  3089.  
  3090.  
  3091.  
  3092.                TSTEP is the printing or plotting increment for line-printer
  3093.  
  3094.           output.   For use with the post-processor, TSTEP is the suggested
  3095.  
  3096.           computing increment.  TSTOP is the final time, and TSTART is  the
  3097.  
  3098.           initial  time.   If  TSTART is omitted, it is assumed to be zero.
  3099.  
  3100.           The transient analysis always begins at time zero.  In the inter-
  3101.  
  3102.           val  <zero,  TSTART>,  the circuit is analyzed (to reach a steady
  3103.  
  3104.           state), but no outputs are  stored.   In  the  interval  <TSTART,
  3105.  
  3106.           TSTOP>,  the circuit is analyzed and outputs are stored.  TMAX is
  3107.  
  3108.           the maximum stepsize that SPICE will use (for default,  the  pro-
  3109.  
  3110.           gram  chooses  either  TSTEP or (TSTOP-TSTART)/50.0, whichever is
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.                                                                          53
  3118.  
  3119.  
  3120.           smaller.  TMAX is useful when one wishes to guarantee a computing
  3121.  
  3122.           interval which is smaller than the printer increment, TSTEP.
  3123.  
  3124.  
  3125.                UIC (use initial conditions) is an  optional  keyword  which
  3126.  
  3127.           indicates  that  the  user  does  not want SPICE to solve for the
  3128.  
  3129.           quiescent  operating  point  before   beginning   the   transient
  3130.  
  3131.           analysis.   If  this  keyword is specified, SPICE uses the values
  3132.  
  3133.           specified using IC=... on the various  elements  as  the  initial
  3134.  
  3135.           transient  condition  and proceeds with the analysis.  If the .IC
  3136.  
  3137.           card has been specified, then the node voltages on the  .IC  card
  3138.  
  3139.           are  used  to  compute  the  intitial conditions for the devices.
  3140.  
  3141.           Look at the description on the .IC card  for  its  interpretation
  3142.  
  3143.           when UIC is not specified.
  3144.  
  3145.  
  3146.  
  3147.           9.14.  .FOUR Card
  3148.  
  3149.  
  3150.           General form:
  3151.  
  3152.  
  3153.                .FOUR FREQ OV1 <OV2 OV3 ...>
  3154.  
  3155.  
  3156.           Examples:
  3157.  
  3158.  
  3159.                .FOUR 100K  V(5)
  3160.  
  3161.  
  3162.  
  3163.                This card controls whether SPICE performs a Fourier analysis
  3164.  
  3165.           as  a  part  of  the transient analysis.  FREQ is the fundamental
  3166.  
  3167.           frequency, and OV1, ..., are the output variables for  which  the
  3168.  
  3169.           analysis  is desired.  The Fourier analysis is performed over the
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.                                                                          54
  3177.  
  3178.  
  3179.           interval <TSTOP-period, TSTOP>, where TSTOP  is  the  final  time
  3180.  
  3181.           specified for the transient analysis, and period is one period of
  3182.  
  3183.           the fundamental frequency.  The dc component and the  first  nine
  3184.  
  3185.           components  are  determined.  For maximum accuracy, TMAX (see the
  3186.  
  3187.           .TRAN card) should be set  to  period/100.0  (or  less  for  very
  3188.  
  3189.           high-Q circuits).
  3190.  
  3191.  
  3192.  
  3193.           9.15.  .PRINT Cards
  3194.  
  3195.  
  3196.           General form:
  3197.  
  3198.  
  3199.                .PRINT PRTYPE OV1 <OV2 ... OV8>
  3200.  
  3201.  
  3202.           Examples:
  3203.  
  3204.  
  3205.                .PRINT TRAN V(4) I(VIN)
  3206.                .PRINT AC VM(4,2) VR(7) VP(8,3)
  3207.                .PRINT DC V(2) I(VSRC) V(23,17)
  3208.                .PRINT NOISE INOISE
  3209.                .PRINT DISTO HD3 SIM2(DB)
  3210.  
  3211.  
  3212.  
  3213.                This card defines the contents of a tabular listing  of  one
  3214.  
  3215.           to  eight  output  variables.  PRTYPE is the type of the analysis
  3216.  
  3217.           (DC, AC, TRAN, NOISE, or DISTO) for which the  specified  outputs
  3218.  
  3219.           are  desired. The form for voltage or current output variables is
  3220.  
  3221.           as follows:
  3222.  
  3223.  
  3224.  
  3225.           V(N1<,N2>)
  3226.  
  3227.                     specifies the voltage difference between nodes  N1  and
  3228.  
  3229.                     N2.  If N2 (and the preceding comma) is omitted, ground
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.                                                                          55
  3237.  
  3238.  
  3239.                     (0) is assumed.  For the ac analysis,  five  additional
  3240.  
  3241.                     outputs can be accessed by replacing the letter V by:
  3242.  
  3243.  
  3244.  
  3245.                                  VR  -    real part
  3246.                                  VI  -    imaginary part
  3247.                                  VM  -    magnitude
  3248.                                  VP  -    phase
  3249.                                  VDB -    20*log10(magnitude)
  3250.  
  3251.  
  3252.  
  3253.  
  3254.           I(VXXXXXXX)
  3255.  
  3256.                     specifies the current flowing in the  independent  vol-
  3257.  
  3258.                     tage  source  named  VXXXXXXX.   Positive current flows
  3259.  
  3260.                     from the positive node,  through  the  source,  to  the
  3261.  
  3262.                     negative  node.  For the ac analysis, the corresponding
  3263.  
  3264.                     replacements for the letter I may be made in  the  same
  3265.  
  3266.                     way as described for voltage outputs.
  3267.  
  3268.  
  3269.  
  3270.                Output variables for the noise and distortion analyses  have
  3271.  
  3272.           a different general form from that of the other analyses, i.e.
  3273.  
  3274.  
  3275.                                 OV<(X)>
  3276.  
  3277.  
  3278.           where OV is any of  ONOISE  (output  noise),  INOISE  (equivalent
  3279.  
  3280.           input  noise),  D2,  HD3, SIM2, DIM2, or DIM3 (see description of
  3281.  
  3282.           distortion analysis), and X may be any of:
  3283.  
  3284.  
  3285.                   R  -    real part
  3286.                   I  -    imaginary part
  3287.                   M  -    magnitude (default if nothing specified)
  3288.                   P  -    phase
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.                                                                          56
  3296.  
  3297.  
  3298.                   DB -    20*log10(magnitude)
  3299.  
  3300.  
  3301.           thus, SIM2 (or SIM2(M)) describes the magnitude of the SIM2  dis-
  3302.  
  3303.           tortion  measure, while HD2(R) describes the real part of the HD2
  3304.  
  3305.           distortion measure.
  3306.  
  3307.  
  3308.                There is no limit on the number of  .PRINT  cards  for  each
  3309.  
  3310.           type of analysis.
  3311.  
  3312.  
  3313.  
  3314.           9.16.  .PLOT Cards
  3315.  
  3316.  
  3317.           General form:
  3318.  
  3319.  
  3320.                .PLOT PLTYPE OV1 <(PLO1,PHI1)> <OV2 <(PLO2,PHI2)> ... OV8>
  3321.  
  3322.  
  3323.           Examples:
  3324.  
  3325.  
  3326.                .PLOT DC V(4) V(5) V(1)
  3327.                .PLOT TRAN V(17,5) (2,5) I(VIN) V(17) (1,9)
  3328.                .PLOT AC VM(5) VM(31,24) VDB(5) VP(5)
  3329.                .PLOT DISTO HD2 HD3(R) SIM2
  3330.                .PLOT TRAN V(5,3) V(4) (0,5) V(7) (0,10)
  3331.  
  3332.  
  3333.  
  3334.                This card defines the contents of one plot of  from  one  to
  3335.  
  3336.           eight  output variables.  PLTYPE is the type of analysis (DC, AC,
  3337.  
  3338.           TRAN, NOISE, or  DISTO)  for  which  the  specified  outputs  are
  3339.  
  3340.           desired.   The  syntax  for  the OVI is identical to that for the
  3341.  
  3342.           .PRINT card, described above.
  3343.  
  3344.  
  3345.                The optional plot limits (PLO,PHI) may  be  specified  after
  3346.  
  3347.           any of the output variables.  All output variables to the left of
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.                                                                          57
  3355.  
  3356.  
  3357.           a pair of plot limits (PLO,PHI) will be plotted  using  the  same
  3358.  
  3359.           lower  and  upper plot bounds.  If plot limits are not specified,
  3360.  
  3361.           SPICE will automatically determine the minimum and maximum values
  3362.  
  3363.           of  all output variables being plotted and scale the plot to fit.
  3364.  
  3365.           More than one scale will be used if the  output  variable  values
  3366.  
  3367.           warrant  (i.e.,  mixing  output  variables  with values which are
  3368.  
  3369.           orders-of-magnitude different still gives readable plots).
  3370.  
  3371.  
  3372.                The overlap of two or more traces on any plot  is  indicated
  3373.  
  3374.           by the letter X.
  3375.  
  3376.  
  3377.                When more than one output variable appears on the same plot,
  3378.  
  3379.           the  first variable specified will be printed as well as plotted.
  3380.  
  3381.           If a printout of all  variables  is  desired,  then  a  companion
  3382.  
  3383.           .PRINT card should be included.
  3384.  
  3385.  
  3386.                There is no limit on the number of .PLOT cards specified for
  3387.  
  3388.           each type of analysis.
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.                                                                          58
  3396.  
  3397.  
  3398.           10.  APPENDIX A:  EXAMPLE DATA DECKS
  3399.  
  3400.  
  3401.  
  3402.           10.1.  Circuit 1
  3403.  
  3404.  
  3405.  
  3406.                The following deck determines the  dc  operating  point  and
  3407.  
  3408.           small-signal transfer function of a simple differential pair.  In
  3409.  
  3410.           addition, the ac small-signal response is computed over the  fre-
  3411.  
  3412.           quency range 1Hz to 100MEGHz.
  3413.  
  3414.  
  3415.               SIMPLE DIFFERENTIAL PAIR
  3416.               VCC 7 0 12
  3417.               VEE 8 0 -12
  3418.               VIN 1 0 AC 1
  3419.               RS1 1 2 1K
  3420.               RS2 6 0 1K
  3421.               Q1 3 2 4 MOD1
  3422.               Q2 5 6 4 MOD1
  3423.               RC1 7 3 10K
  3424.               RC2 7 5 10K
  3425.               RE 4 8 10K
  3426.                .MODEL MOD1 NPN BF=50 VAF=50 IS=1.E-12 RB=100 CJC=.5PF TF=.6NS
  3427.                .TF V(5) VIN
  3428.                .AC DEC 10 1 100MEG
  3429.                .PLOT AC VM(5) VP(5)
  3430.                .PRINT AC VM(5) VP(5)
  3431.                .END
  3432.  
  3433.  
  3434.  
  3435.  
  3436.           10.2.  Circuit 2
  3437.  
  3438.           The following deck computes the output characteristics of a  MOS-
  3439.  
  3440.           FET device over the range 0-10V for VDS and 0-5V for VGS.
  3441.  
  3442.  
  3443.  
  3444.                MOS OUTPUT CHARACTERISTICS
  3445.                .OPTIONS NODE NOPAGE
  3446.                VDS 3 0
  3447.                VGS 2 0
  3448.                M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.                                                                          59
  3456.  
  3457.  
  3458.                .MODEL MOD1 NMOS VTO=-2 NSUB=1.0E15 UO=550
  3459.                * VIDS MEASURES ID, WE COULD HAVE USED VDS, BUT ID WOULD BE NEGATIVE
  3460.                VIDS 3 1
  3461.                .DC VDS 0 10 .5 VGS 0 5 1
  3462.                .PRINT DC I(VIDS) V(2)
  3463.                .PLOT DC I(VIDS)
  3464.                .END
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.                                                                          60
  3472.  
  3473.  
  3474.           10.3.  Circuit 3
  3475.  
  3476.  
  3477.  
  3478.                The following deck determines the dc transfer curve and  the
  3479.  
  3480.           transient  pulse response of a simple RTL inverter.  The input is
  3481.  
  3482.           a pulse from 0 to 5 Volts with delay, rise, and fall times of 2ns
  3483.  
  3484.           and a pulse width of 30ns.  The transient interval is 0 to 100ns,
  3485.  
  3486.           with printing to be done every nanosecond.
  3487.  
  3488.  
  3489.  
  3490.                SIMPLE RTL INVERTER
  3491.                VCC 4 0 5
  3492.                VIN 1 0 PULSE 0 5 2NS 2NS 2NS 30NS
  3493.                RB 1 2 10K
  3494.                Q1 3 2 0 Q1
  3495.                RC 3 4 1K
  3496.                .PLOT DC V(3)
  3497.                .PLOT TRAN V(3) (0,5)
  3498.                .PRINT TRAN V(3)
  3499.                .MODEL Q1 NPN BF 20 RB 100 TF .1NS CJC 2PF
  3500.                .DC VIN 0 5 0.1
  3501.                .TRAN 1NS 100NS
  3502.                .END
  3503.  
  3504.  
  3505.  
  3506.  
  3507.           10.4.  Circuit 4
  3508.  
  3509.  
  3510.                The following deck simulates a four-bit binary adder,  using
  3511.  
  3512.           several  subcircuits  to  describe  various pieces of the overall
  3513.  
  3514.           circuit.
  3515.  
  3516.  
  3517.  
  3518.               ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
  3519.  
  3520.                    *** SUBCIRCUIT DEFINITIONS
  3521.  
  3522.                .SUBCKT NAND 1 2 3 4
  3523.                     *   NODES:  INPUT(2), OUTPUT, VCC
  3524.                Q1 9 5 1 QMOD
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.                                                                          61
  3532.  
  3533.  
  3534.                D1CLAMP 0 1 DMOD
  3535.                Q2 9 5 2 QMOD
  3536.                D2CLAMP 0 2 DMOD
  3537.                RB 4 5 4K
  3538.                R1 4 6 1.6K
  3539.                Q3 6 9 8 QMOD
  3540.                R2 8 0 1K
  3541.                RC 4 7 130
  3542.                Q4 7 6 10 QMOD
  3543.                DVBEDROP 10 3 DMOD
  3544.                Q5 3 8 0 QMOD
  3545.                .ENDS NAND
  3546.                .SUBCKT ONEBIT 1 2 3 4 5 6
  3547.                     *   NODES:  INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC
  3548.                X1 1 2 7 6 NAND
  3549.                X2 1 7 8 6 NAND
  3550.                X3 2 7 9 6 NAND
  3551.                X4 8 9 10 6 NAND
  3552.                X5 3 10 11 6 NAND
  3553.                X6 3 11 12 6 NAND
  3554.                X7 10 11 13 6 NAND
  3555.                X8 12 13 4 6 NAND
  3556.                X9 11 7 5 6 NAND
  3557.                .ENDS ONEBIT
  3558.                .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9
  3559.                     *   NODES:  INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1,
  3560.                     *           CARRY-IN, CARRY-OUT, VCC
  3561.                X1 1 2 7 5 10 9 ONEBIT
  3562.                X2 3 4 10 6 8 9 ONEBIT
  3563.                .ENDS TWOBIT
  3564.  
  3565.                .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  3566.                    *   NODES:  INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2),
  3567.                    *           OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC
  3568.                X1 1 2 3 4 9 10 13 16 15 TWOBIT
  3569.                X2 5 6 7 8 11 12 16 14 15 TWOBIT
  3570.                .ENDS FOURBIT
  3571.  
  3572.                    *** DEFINE NOMINAL CIRCUIT
  3573.  
  3574.                .MODEL DMOD D
  3575.                .MODEL QMOD NPN(BF=75 RB=100 CJE=1PF CJC=3PF)
  3576.                VCC 99 0 DC 5V
  3577.                VIN1A 1 0 PULSE(0 3 0 10NS 10NS   10NS   50NS)
  3578.                VIN1B 2 0 PULSE(0 3 0 10NS 10NS   20NS  100NS)
  3579.                VIN2A 3 0 PULSE(0 3 0 10NS 10NS   40NS  200NS)
  3580.                VIN2B 4 0 PULSE(0 3 0 10NS 10NS   80NS  400NS)
  3581.                VIN3A 5 0 PULSE(0 3 0 10NS 10NS  160NS  800NS)
  3582.                VIN3B 6 0 PULSE(0 3 0 10NS 10NS  320NS 1600NS)
  3583.                VIN4A 7 0 PULSE(0 3 0 10NS 10NS  640NS 3200NS)
  3584.                VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS)
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.                                                                          62
  3592.  
  3593.  
  3594.                X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT
  3595.                RBIT0 9 0 1K
  3596.                RBIT1 10 0 1K
  3597.                RBIT2 11 0 1K
  3598.                RBIT3 12 0 1K
  3599.                RCOUT 13 0 1K
  3600.                .PLOT TRAN V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8)
  3601.                .PLOT TRAN V(9) V(10) V(11) V(12) V(13)
  3602.                .PRINT TRAN V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8)
  3603.                .PRINT TRAN V(9) V(10) V(11) V(12) V(13)
  3604.  
  3605.                    *** (FOR THOSE WITH MONEY (AND MEMORY) TO BURN)
  3606.                .TRAN 1NS 6400NS
  3607.  
  3608.                .OPTIONS ACCT LIST NODE LIMPTS=6401
  3609.                .END
  3610.  
  3611.  
  3612.  
  3613.  
  3614.           10.5.  Circuit 5
  3615.  
  3616.  
  3617.  
  3618.                The following deck simulates a  transmission-line  inverter.
  3619.  
  3620.           Two transmission-line elements are required since two propagation
  3621.  
  3622.           modes are excited.  In the case of a coaxial line, the first line
  3623.  
  3624.           (T1)  models  the inner conductor with respect to the shield, and
  3625.  
  3626.           the second line (T2) models the shield with respect to  the  out-
  3627.  
  3628.           side world.
  3629.  
  3630.  
  3631.  
  3632.               TRANSMISSION-LINE INVERTER
  3633.               V1 1 0 PULSE(0 1 0 0.1N)
  3634.               R1 1 2 50
  3635.               X1 2 0 0 4 TLINE
  3636.               R2 4 0 50
  3637.                .SUBCKT TLINE 1 2 3 4
  3638.               T1 1 2 3 4 Z0=50 TD=1.5NS
  3639.               T2 2 0 4 0 Z0=100 TD=1NS
  3640.                .ENDS TLINE
  3641.                .TRAN 0.1NS 20NS
  3642.                .PLOT TRAN V(2) V(4)
  3643.                .END
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.                                                                          63
  3651.  
  3652.  
  3653.           11.  APPENDIX B:  NONLINEAR DEPENDENT SOURCES
  3654.  
  3655.  
  3656.  
  3657.                SPICE allows circuits to contain dependent  sources  charac-
  3658.  
  3659.           terized by any of the four equations
  3660.  
  3661.  
  3662.                   i=f(v)          v=f(v)          i=f(i)          v=f(i)
  3663.  
  3664.  
  3665.           where the functions must be polynomials, and the arguments may be
  3666.  
  3667.           multidimensional.   The  polynomial  functions are specified by a
  3668.  
  3669.           set of coefficients p0, p1, ..., pn.  Both the number  of  dimen-
  3670.  
  3671.           sions  and the number of coefficients are arbitrary.  The meaning
  3672.  
  3673.           of the coefficients depends upon the dimension of the polynomial,
  3674.  
  3675.           as shown in the following examples:
  3676.  
  3677.  
  3678.                Suppose that the function is  one-dimensional  (that  is,  a
  3679.  
  3680.           function  of one argument).  Then the function value fv is deter-
  3681.  
  3682.           mined by the following expression in fa (the function argument):
  3683.  
  3684.  
  3685.               fv = p0 + (p1*fa) + (p2*fa**2) + (p3*fa**3) + (p4*fa**4)
  3686.  
  3687.  
  3688.                    + (p5*fa**5) + ...
  3689.  
  3690.  
  3691.                Suppose now that the function is two-dimensional, with argu-
  3692.  
  3693.           ments fa and fb.  Then the function value fv is determined by the
  3694.  
  3695.           following expression:
  3696.  
  3697.  
  3698.               fv = p0 + (p1*fa) +  (p2*fb)  +  (p3*fa**2)  +  (p4*fa*fb)  +
  3699.  
  3700.           (p5*fb**2)
  3701.  
  3702.  
  3703.                    +  (p6*fa**3)  +   (p7*fa**2*fb)   +   (p8*fa*fb**2)   +
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.                                                                          64
  3711.  
  3712.  
  3713.           (p9*fb**3) + ...
  3714.  
  3715.  
  3716.                Consider now the  case  of  a  three-dimensional  polynomial
  3717.  
  3718.           function  with arguments fa, fb, and fc.  Then the function value
  3719.  
  3720.           fv is determined by the following expression:
  3721.  
  3722.  
  3723.               fv = p0  +  (p1*fa)  +  (p2*fb)  +  (p3*fc)  +  (p4*fa**2)  +
  3724.  
  3725.           (p5*fa*fb)
  3726.  
  3727.  
  3728.                    + (p6*fa*fc) + (p7*fb**2) + (p8*fb*fc)  +  (p9*fc**2)  +
  3729.  
  3730.           (p10*fa**3)
  3731.  
  3732.  
  3733.                    + (p11*fa**2*fb) + (p12*fa**2*fc) + (p13*fa*fb**2)
  3734.  
  3735.  
  3736.                    + (p14*fa*fb*fc)
  3737.  
  3738.  
  3739.                    +  (p15*fa*fc**2)  +  (p16*fb**3)  +  (p17*fb**2*fc)   +
  3740.  
  3741.           (p18*fb*fc**2)
  3742.  
  3743.  
  3744.                    + (p19*fc**3) + (p20*fa**4) + ...
  3745.  
  3746.  
  3747.                Note:  if the polynomial is one-dimensional and exactly  one
  3748.  
  3749.           coefficient  is specified, then SPICE assumes it to be p1 (and p0
  3750.  
  3751.           = 0.0), in order to facilitate the  input  of  linear  controlled
  3752.  
  3753.           sources.
  3754.  
  3755.  
  3756.                For all four of the dependent sources described  below,  the
  3757.  
  3758.           initial  condition  parameter  is  described as optional.  If not
  3759.  
  3760.           specified, SPICE assumes 0 the initial  condition  for  dependent
  3761.  
  3762.           sources  is  an  initial 'guess' for the value of the controlling
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.                                                                          65
  3770.  
  3771.  
  3772.           variable.  The program uses this initial condition to obtain  the
  3773.  
  3774.           dc  operating  point  of the circuit.  After convergence has been
  3775.  
  3776.           obtained, the program continues iterating  to  obtain  the  exact
  3777.  
  3778.           value  for the controlling variable.  Hence, to reduce the compu-
  3779.  
  3780.           tational effort for the dc operating point (or if the  polynomial
  3781.  
  3782.           specifies  a  strong  nonlinearity),  a value fairly close to the
  3783.  
  3784.           actual controlling variable should be specified for  the  initial
  3785.  
  3786.           condition.
  3787.  
  3788.  
  3789.  
  3790.           11.1.  Voltage-Controlled Current Sources
  3791.  
  3792.  
  3793.           General form:
  3794.  
  3795.  
  3796.               GXXXXXXX N+ N- <POLY(ND)> NC1+ NC1- ... P0 <P1 ...> <IC=...>
  3797.  
  3798.  
  3799.           Examples:
  3800.  
  3801.  
  3802.               G1 1 0 5 3 0 0.1M
  3803.               GR 17 3 17 3 0 1M 1.5M IC=2V
  3804.               GMLT 23 17 POLY(2) 3 5 1 2 0 1M 17M 3.5U IC=2.5, 1.3
  3805.  
  3806.  
  3807.  
  3808.                N+ and N- are the positive and negative nodes, respectively.
  3809.  
  3810.           Current  flow  is  from the positive node, through the source, to
  3811.  
  3812.           the negative node.  POLY(ND) only has  to  be  specified  if  the
  3813.  
  3814.           source is multi-dimensional (one-dimensional is the default).  If
  3815.  
  3816.           specified, ND is the number of dimensions, which  must  be  posi-
  3817.  
  3818.           tive.   NC1+, NC1-, ... Are the positive and negative controlling
  3819.  
  3820.           nodes, respectively.  One pair of nodes  must  be  specified  for
  3821.  
  3822.           each   dimension.   P0,  P1,  P2,  ...,  Pn  are  the  polynomial
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.                                                                          66
  3830.  
  3831.  
  3832.           coefficients.  The (optional) initial condition  is  the  initial
  3833.  
  3834.           guess  at  the  value(s)  of  the controlling voltage(s).  If not
  3835.  
  3836.           specified, 0.0 is assumed.  The polynomial specifies  the  source
  3837.  
  3838.           current  as a function of the controlling voltage(s).  The second
  3839.  
  3840.           example above describes a current source with value
  3841.  
  3842.  
  3843.                   I = 1E-3*V(17,3) + 1.5E-3*V(17,3)**2
  3844.  
  3845.  
  3846.           note that since the source nodes are the same as the  controlling
  3847.  
  3848.           nodes, this source actually models a nonlinear resistor.
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.                                                                          67
  3856.  
  3857.  
  3858.           11.2.  Voltage-Controlled Voltage Sources
  3859.  
  3860.  
  3861.           General form:
  3862.  
  3863.  
  3864.               EXXXXXXX N+ N- <POLY(ND)> NC1+ NC1- ... P0 <P1 ...> <IC=...>
  3865.  
  3866.  
  3867.           Examples:
  3868.  
  3869.  
  3870.               E1 3 4 21 17 10.5 2.1 1.75
  3871.               EX 17 0 POLY(3) 13 0 15 0 17 0 0 1 1 1 IC=1.5,2.0,17.35
  3872.  
  3873.  
  3874.  
  3875.                N+ and N- are the positive and negative nodes, respectively.
  3876.  
  3877.           POLY(ND)  only  has  to  be  specified  if  the  source is multi-
  3878.  
  3879.           dimensional (one-dimensional is the default).  If  specified,  ND
  3880.  
  3881.           is the number of dimensions, which must be positive.  NC1+, NC1-,
  3882.  
  3883.           ... are the positive  and  negative  controlling  nodes,  respec-
  3884.  
  3885.           tively.   One pair of nodes must be specified for each dimension.
  3886.  
  3887.           P0, P1,  P2,  ...,  Pn  are  the  polynomial  coefficients.   The
  3888.  
  3889.           (optional) initial condition is the initial guess at the value(s)
  3890.  
  3891.           of the controlling voltage(s).  If not specified, 0.0 is assumed.
  3892.  
  3893.           The  polynomial specifies the source voltage as a function of the
  3894.  
  3895.           controlling voltage(s).  The second  example  above  describes  a
  3896.  
  3897.           voltage source with value
  3898.  
  3899.  
  3900.                   V = V(13,0) + V(15,0) + V(17,0)
  3901.  
  3902.  
  3903.           (in other words, an ideal voltage summer).
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.                                                                          68
  3911.  
  3912.  
  3913.           11.3.  Current-Controlled Current Sources
  3914.  
  3915.  
  3916.           General form:
  3917.  
  3918.  
  3919.               FXXXXXXX N+ N- <POLY(ND)> VN1 <VN2 ...> P0 <P1 ...> <IC=...>
  3920.  
  3921.  
  3922.           Examples:
  3923.  
  3924.  
  3925.               F1 12 10 VCC 1MA 1.3M
  3926.               FXFER 13 20 VSENS 0 1
  3927.  
  3928.  
  3929.  
  3930.                N+ and N- are the positive and negative nodes, respectively.
  3931.  
  3932.           Current  flow  is  from the positive node, through the source, to
  3933.  
  3934.           the negative node.  POLY(ND) only has  to  be  specified  if  the
  3935.  
  3936.           source is multi-dimensional (one-dimensional is the default).  If
  3937.  
  3938.           specified, ND is the number of dimensions, which  must  be  posi-
  3939.  
  3940.           tive.   VN1,  VN2,  ...  are the names of voltage sources through
  3941.  
  3942.           which the controlling current flows;  one name must be  specified
  3943.  
  3944.           for  each  dimension.   The  direction  of  positive  controlling
  3945.  
  3946.           current flow is from the positive node, through  the  source,  to
  3947.  
  3948.           the  negative  node  of each voltage source.  P0, P1, P2, ..., Pn
  3949.  
  3950.           are the polynomial coefficients.  The (optional)  initial  condi-
  3951.  
  3952.           tion  is  the  initial  guess  at the value(s) of the controlling
  3953.  
  3954.           current(s) (in Amps).  If not specified,  0.0  is  assumed.   The
  3955.  
  3956.           polynomial specifies the source current as a function of the con-
  3957.  
  3958.           trolling current(s).  The first example above describes a current
  3959.  
  3960.           source with value
  3961.  
  3962.  
  3963.                   I = 1E-3 + 1.3E-3*I(VCC)
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.                                                                          69
  3971.  
  3972.  
  3973.           11.4.  Current-Controlled Voltage Sources
  3974.  
  3975.  
  3976.           General form:
  3977.  
  3978.  
  3979.               HXXXXXXX N+ N- <POLY(ND)> VN1 <VN2 ...> P0 <P1 ...> <IC=...>
  3980.  
  3981.  
  3982.           Examples:
  3983.  
  3984.  
  3985.               HXY 13 20 POLY(2) VIN1 VIN2 0 0 0 0 1 IC=0.5 1.3
  3986.               HR 4 17 VX 0 0 1
  3987.  
  3988.  
  3989.  
  3990.                N+ and N- are the positive and negative nodes, respectively.
  3991.  
  3992.           POLY(ND)  only  has  to  be  specified  if  the  source is multi-
  3993.  
  3994.           dimensional (one-dimensional is the default).  If  specified,  ND
  3995.  
  3996.           is  the  number of dimensions, which must be positive.  VN1, VN2,
  3997.  
  3998.           ... are the names of voltage sources through which  the  control-
  3999.  
  4000.           ling  current  flows;  one name must be specified for each dimen-
  4001.  
  4002.           sion.  The direction of positive controlling current flow is from
  4003.  
  4004.           the  positive  node,  through the source, to the negative node of
  4005.  
  4006.           each voltage source.  P0, P1, P2,  ...,  Pn  are  the  polynomial
  4007.  
  4008.           coefficients.   The  (optional)  initial condition is the initial
  4009.  
  4010.           guess at the value(s) of the controlling  current(s)  (in  Amps).
  4011.  
  4012.           If  not  specified, 0.0 is assumed.  The polynomial specifies the
  4013.  
  4014.           source voltage as a function of the controlling current(s).   The
  4015.  
  4016.           first example above describes a voltage source with value
  4017.  
  4018.  
  4019.                   V = I(VIN1)*I(VIN2)
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.                                                                          70
  4027.  
  4028.  
  4029.           12. APPENDIX C: BIPOLAR MODEL EQUATIONS
  4030.  
  4031.  
  4032.               (G    terms omitted)
  4033.                 min
  4034.  
  4035.  
  4036.           Acknowledgment: This section has been contributed by Bill  Bider-
  4037.  
  4038.           mann at HP labs.
  4039.  
  4040.  
  4041.           12.1  D.C. MODEL
  4042.  
  4043.                          qVB'E'    qVB'C'        qVB'C'           qVB'C'
  4044.                    IS    ______    ______        ______           ______
  4045.                    __    NF*kT     NR*kT   IS    NR*kT            NC*kT
  4046.               IC = QB( e       - e       )-  ( e       -1)-ISC( e       -1)
  4047.                                            BR
  4048.  
  4049.                      qVB'E'          qVB'C'           qVB'E'           qVB'C'
  4050.                IS    NF*kT     IS    NR*kT            NE*kT            NC*kT
  4051.          IB =   ( e       -1)+__( e       -1)+ISE( e       -1)+ISC( e       -1)
  4052.                    BF              BR
  4053.  
  4054.           NOTE: The last two terms in the expression of the base current IB
  4055.  
  4056.           represent  the  components  due to recombination in the BE and BC
  4057.  
  4058.           space charge regions at low injection.
  4059.  
  4060.  
  4061.           If IRB not specified
  4062.  
  4063.                        RB-RBM
  4064.             RBB' = RBM+
  4065.                          QB
  4066.  
  4067.           If IRB specified
  4068.  
  4069.                                ____TAN(Z)-Z___
  4070.             RBB' = 3(RB-RBM) *                +RBM
  4071.                                Z*TAN(Z)*TAN(Z)
  4072.  
  4073.           Where:
  4074.  
  4075.                           -1+(144IB/(pi*pi*IRB)+1)**0.5
  4076.                      Z =
  4077.                             24/(pi*pi)*(IB/IRB)**0.5
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.                                                                          71
  4085.  
  4086.                     Q1
  4087.               QB =    (1+(1+4Q2)**0.5)
  4088.                     2
  4089.  
  4090.                          1
  4091.                    _____________
  4092.               Q1 =   VB'C' VB'E'
  4093.                    1-_____-_____
  4094.                       VAF   VAR
  4095.  
  4096.                           qVB'E'           qVB'C'
  4097.                     IS    ______           ______
  4098.                    ___    NF*kT     _IS    NR*kT
  4099.               Q2 = IKF( e       -1)+   ( e       -1)
  4100.                                     IKR
  4101.  
  4102.           NOTE: IRB is the current where the base resistance falls  halfway
  4103.  
  4104.           to  its minimum value.  VAF and VAR are forward and reverse Early
  4105.  
  4106.           voltages respectively.  IKF and IKR determine  the  high  current
  4107.  
  4108.           beta  rolloff  with  IC.   ISE,  ISC, NE and NC determine the low
  4109.  
  4110.           current beta rolloff with IC.
  4111.  
  4112.  
  4113.           12.2  A.C. MODEL
  4114.  
  4115.                                        qVB'E'
  4116.                     ___d___      IS    NF*kT             VB'E'
  4117.               CBE =        ( TFF*__( e       -1))+CJE( 1-_____)-MJ
  4118.                     d VB'E'      QB                       VJE
  4119.  
  4120.           Where:
  4121.  
  4122.                                                                VB'C'
  4123.                                                               _______
  4124.                                                         2     1.44VTF
  4125.                       TFF = TF ( 1 + XTF * (IF/(IF+ITF))  * e        )
  4126.  
  4127.                                  qVB'E'
  4128.                                  ______
  4129.                                  NF*kT
  4130.                       IF = IS( e       -1)
  4131.  
  4132.  
  4133.               CB1 = CBC*(1-XCJC)
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.                                                                          72
  4141.  
  4142.  
  4143.               CB2 = CBC * XCJC
  4144.  
  4145.                                qVB'C'
  4146.                                ______
  4147.                         _qIS_    kT            VB'C' -MJC
  4148.               CBC = TR (      e      )+CJC ( 1-     )
  4149.                         NR*kT                   VJC
  4150.  
  4151.                            VC'S' -MJS
  4152.               CSS = CJS (1-     )
  4153.                             VJS
  4154.                                                              _V_ -M
  4155.           NOTE: all junction capacitances of the form  C0*(1-   )    revert
  4156.                                                              phi
  4157.           to the form
  4158.  
  4159.  
  4160.                                                 M*(V-FC*phi)
  4161.                        C0/((1-FC)**M)  *  (1 +              )
  4162.                                                  phi(1-FC)
  4163.           when V > FC*phi   ( For CSS assumes FC = 0 )
  4164.  
  4165.  
  4166.           12.3  NOISE MODEL
  4167.  
  4168.  
  4169.                      4kT
  4170.                 2   ____
  4171.           IRBB'   = RBB' DELTA f
  4172.                                 |
  4173.                                 |
  4174.                                 |
  4175.                      4kT        |
  4176.                 2    ___        |
  4177.             IRC   =  RC  DELTA f|   Thermal nois*
  4178.                                 |
  4179.                                 |
  4180.                                 |
  4181.                      4kT        |KF*IB**AF
  4182.                 2    ___        |_________
  4183.             IRE   = 2REB DELTA f+    f     DELTA f
  4184.  
  4185.  
  4186.  
  4187.  
  4188.           Note: The first term is shot noise and the second term is flicker
  4189.  
  4190.           noise.
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.                                                                          73
  4198.  
  4199.                 2
  4200.             ICN   = 2qIC DELTA f
  4201.  
  4202.           Note: This is shot noise.
  4203.  
  4204.  
  4205.           12.4  TEMPERATURE EFFECTS
  4206.  
  4207.           All junctions have dependences identical  to the diode model  but
  4208.  
  4209.           all N factors are considered equal 1.
  4210.  
  4211.                                T
  4212.            BF and  BR go as (____)XTB
  4213.                              TNOM
  4214.  
  4215.            when NF=1.  This is done through appropriate changes in  BF , BR
  4216.  
  4217.           and ISE, ISC according to the following equations respectively:
  4218.  
  4219.                                            T
  4220.                                          ____ XTB
  4221.               BF' (or BR') = BF (or BR)*(TNOM)
  4222.  
  4223.  
  4224.                                                                 qEG T-TNOM
  4225.                                                                 ___ ______
  4226.                                               __T_ (XTI-XTB)    Nk  T*TNOM
  4227.               ISE' (or ISC') = ISE (or ISC) *(    )          *e
  4228.                                               TNOM
  4229.  
  4230.           12.5  EXCESS PHASE
  4231.  
  4232.  
  4233.           This is a  delay  (linear  phase)  in  the  gm  generator  in  AC
  4234.  
  4235.           analysis.   It  is also used in transient analysis using a Bessel
  4236.  
  4237.           polynomial approximation.  Excess phase, PTF, is specified as the
  4238.  
  4239.           number of extra degrees of phase at the frequency
  4240.  
  4241.                                         1
  4242.                                   f = _____  Hertz
  4243.                                       2piTF
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.                                                                          74
  4251.  
  4252.  
  4253.           12.   APPENDIX  D:    ALTER  STATEMENT  AND  THE  SOURCE-STEPPING
  4254.  
  4255.           METHOD
  4256.  
  4257.  
  4258.  
  4259.                The ALTER statement allows SPICE to run with altered circuit
  4260.  
  4261.           parameters.
  4262.  
  4263.  
  4264.           General form:
  4265.  
  4266.  
  4267.                .ALTER
  4268.                ELEMENT CARDS (DEVICE CARDS, MODEL CARDS)
  4269.                .ALTER (or .END CARD)
  4270.  
  4271.  
  4272.  
  4273.           Examples:
  4274.  
  4275.  
  4276.  
  4277.                R1 1 0 5K
  4278.                VCC 3 0 10
  4279.                M1 3 2 0 MOD1 L=5U W=2U
  4280.                .MODEL MOD1 NMOS(VTO=1.0 KP=2.0E-5 PHI=0.6 NSUB=2.0E15 TOX=0.1U)
  4281.                .ALTER
  4282.                R1 1 0 3.5K
  4283.                VCC 3 0 12
  4284.                M1 3 2 0 MOD1 L=10U W=2U
  4285.                .MODEL MOD1 NMOS(VTO=1.2 KP=2.0E-5 PHI=0.6 NSUB=5.0E15 TOX=1.5U)
  4286.                .ALTER
  4287.                M1 3 2 0 MOD1 L=10U W=4U
  4288.                .END
  4289.  
  4290.  
  4291.  
  4292.                This card introduces the element(s), device(s) and  model(s)
  4293.  
  4294.           whose  parameters  are  changed during the execution of the input
  4295.  
  4296.           deck.  The analyses specified in the deck will start  over  again
  4297.  
  4298.           with  the  changed  parameters.  The  .ALTER  card with the cards
  4299.  
  4300.           defining the new parameters should be placed just before the .END
  4301.  
  4302.           card.  The syntax for the element (device, model) cards is ident-
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.                                                                          75
  4311.  
  4312.  
  4313.           ical to that of the cards with the original parameters.
  4314.  
  4315.  
  4316.                There is no limit on the number of .ALTER cards and the cir-
  4317.  
  4318.           cuit  will  be  re-analyzed as many times as the number of .ALTER
  4319.  
  4320.           cards.  Subsequent ALTER operations employ parameters of the pre-
  4321.  
  4322.           vious change.  No topological change of the circuit is allowed.
  4323.  
  4324.  
  4325.  
  4326.                The source-stepping method can enhance DC convergence.   But
  4327.  
  4328.           it  is  slower  than  direct  use  of  the Newton-Raphson method.
  4329.  
  4330.           Therefore it is best used as an alternative  to  achieve  conver-
  4331.  
  4332.           gence of DC operating point when the circuit fails to converge by
  4333.  
  4334.           using the Newton-Raphson method.  The source-stepping  method  is
  4335.  
  4336.           used  by SPICE when the variable ITL6 in the .OPTIONS card is set
  4337.  
  4338.           to the iteration limit at each step of the source(s).
  4339.  
  4340.  
  4341.           For example,
  4342.  
  4343.  
  4344.                .OPTIONS ITL6=30
  4345.  
  4346.  
  4347.           will cause SPICE to use  source-stepping  method  with  iteration
  4348.  
  4349.           limit  30 at each step.  By default, ITL6 is 0 which means to use
  4350.  
  4351.           the Newton-Raphson method directly.
  4352. c
  4353.